Changeset 528 for Whitix/branches/hybrid
- Timestamp:
- 05/24/08 09:51:18 (5 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/hybrid/include/fs/devfs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/hybrid/include/fs/devfs.h
r58 r528 35 35 }; 36 36 37 /* Structures */ 38 struct DevFsDir 39 { 40 struct ListHead entries; /* All DevFsEntrys */ 41 struct DevFsDir* parent; 42 }; 43 44 struct DevFsEntry 45 { 46 struct ListHead next; 47 int type; 48 union { 49 struct DevFsDir dir; 50 struct DevFsDevice device; 51 }; 52 char name[1]; 53 }; 54 37 55 struct StorageDevice; 38 56 39 57 int DevAddDevice(char* name,WORD major,WORD minor,int type,void* ops); 40 void* DeviceGetOps(struct VNode* devNode);41 58 42 59 struct StorageDevice* DevFindRootDev(WORD major,WORD minor); 43 60 61 static inline void* DeviceGetOps(struct VNode* devNode) 62 { 63 struct DevFsEntry* entry=(struct DevFsEntry*)(devNode->extraInfo); 64 65 /* DevFs directories don't have specific operations. */ 66 if (entry->type & VFS_ATTR_DIR) 67 return NULL; 68 69 return (void*)(entry->device.ops); 70 } 71 44 72 #endif
