X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Ffs%2Fdevfs.c;h=6ead47e5ab2dda2069b771e363b11ebc422b2f7b;hb=1ca0233bb1e142c536d09c35ce8dcdb209a2938b;hp=25be49073af55a3c3747b46fff78af802a38536d;hpb=8bc40333b1401d7616b225945fee53d972c2f418;p=tpg%2Facess2.git diff --git a/Kernel/vfs/fs/devfs.c b/Kernel/vfs/fs/devfs.c index 25be4907..6ead47e5 100644 --- a/Kernel/vfs/fs/devfs.c +++ b/Kernel/vfs/fs/devfs.c @@ -9,15 +9,17 @@ // === PROTOTYPES === int DevFS_AddDevice(tDevFS_Driver *Dev); -tVFS_Node *DevFS_InitDevice(char *Device, char *Options); +tVFS_Node *DevFS_InitDevice(char *Device, char **Options); char *DevFS_ReadDir(tVFS_Node *Node, int Pos); tVFS_Node *DevFS_FindDir(tVFS_Node *Node, char *Name); // === GLOBALS === tVFS_Driver gDevFS_Info = { - "devfs", 0, DevFS_InitDevice, NULL + "devfs", 0, DevFS_InitDevice, NULL, NULL }; tVFS_Node gDevFS_RootNode = { + .Size = 0, + .Flags = VFS_FFLAG_DIRECTORY, .NumACLs = 1, .ACLs = &gVFS_ACL_EveryoneRW, .ReadDir = DevFS_ReadDir, @@ -34,16 +36,16 @@ int DevFS_AddDevice(tDevFS_Driver *Dev) { Dev->Next = gDevFS_Drivers; gDevFS_Drivers = Dev; - + gDevFS_RootNode.Size ++; return giDevFS_NextID++; } /** - * \fn tVFS_Node *DevFS_InitDevice(char *Device, char *Options) + * \fn tVFS_Node *DevFS_InitDevice(char *Device, char **Options) * \brief Initialise the DevFS and detect double-mounting, or just do nothing * \stub */ -tVFS_Node *DevFS_InitDevice(char *Device, char *Options) +tVFS_Node *DevFS_InitDevice(char *Device, char **Options) { return &gDevFS_RootNode; } @@ -62,7 +64,7 @@ char *DevFS_ReadDir(tVFS_Node *Node, int Pos) dev = dev->Next ); - return dev->Name; + return strdup(dev->Name); } /**