X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fvfs%2Ffs%2Fdevfs.c;h=d396a1f877d28c21d90aec56258fc6da798ea3b7;hb=f04f6f4d823b7df2117da9737a3f12d080b54d74;hp=25585095b2fa5956a3a014666670d831b085eab4;hpb=00f24d0160b5ada315a6338c2ac6062deb2880ed;p=tpg%2Facess2.git diff --git a/Kernel/vfs/fs/devfs.c b/Kernel/vfs/fs/devfs.c index 25585095..d396a1f8 100644 --- a/Kernel/vfs/fs/devfs.c +++ b/Kernel/vfs/fs/devfs.c @@ -3,13 +3,13 @@ * Device Filesystem (DevFS) * - vfs/fs/devfs.c */ -#include +#include #include #include // === 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); @@ -18,8 +18,10 @@ tVFS_Driver gDevFS_Info = { "devfs", 0, DevFS_InitDevice, NULL, NULL }; tVFS_Node gDevFS_RootNode = { + .Size = 0, + .Flags = VFS_FFLAG_DIRECTORY, .NumACLs = 1, - .ACLs = &gVFS_ACL_EveryoneRW, + .ACLs = &gVFS_ACL_EveryoneRX, .ReadDir = DevFS_ReadDir, .FindDir = DevFS_FindDir }; @@ -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 + * \note 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); } /**