X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FFilesystems%2FNTFS%2Fmain.c;h=dbda06e1e7b184d399c1b2370efdc7941e4e2dd7;hb=5f2024e5977e0cca0993a20dad5ab794c94d5711;hp=5cdcc6672d9ef23822deeba55aff6228edd525da;hpb=6f1c621ed4d24ddbdc863cd5ef684e919c8f8b55;p=tpg%2Facess2.git diff --git a/Modules/Filesystems/NTFS/main.c b/Modules/Filesystems/NTFS/main.c index 5cdcc667..dbda06e1 100644 --- a/Modules/Filesystems/NTFS/main.c +++ b/Modules/Filesystems/NTFS/main.c @@ -13,17 +13,23 @@ // === IMPORTS === extern char *NTFS_ReadDir(tVFS_Node *Node, int Pos); -extern tVFS_Node *NTFS_FindDir(tVFS_Node *Node, char *Name); +extern tVFS_Node *NTFS_FindDir(tVFS_Node *Node, const char *Name); // === PROTOTYPES === int NTFS_Install(char **Arguments); -tVFS_Node *NTFS_InitDevice(char *Devices, char **Options); +tVFS_Node *NTFS_InitDevice(const char *Devices, const char **Options); void NTFS_Unmount(tVFS_Node *Node); void NTFS_DumpEntry(tNTFS_Disk *Disk, Uint32 Entry); // === GLOBALS === MODULE_DEFINE(0, 0x0A /*v0.1*/, FS_NTFS, NTFS_Install, NULL); tVFS_Driver gNTFS_FSInfo = {"ntfs", 0, NTFS_InitDevice, NTFS_Unmount, NULL}; +tVFS_NodeType gNTFS_DirType = { + .TypeName = "NTFS-File", + .ReadDir = NTFS_ReadDir, + .FindDir = NTFS_FindDir, + .Close = NULL + }; tNTFS_Disk gNTFS_Disks; @@ -40,7 +46,7 @@ int NTFS_Install(char **Arguments) /** * \brief Mount a NTFS volume */ -tVFS_Node *NTFS_InitDevice(char *Device, char **Options) +tVFS_Node *NTFS_InitDevice(const char *Device, const char **Options) { tNTFS_Disk *disk; tNTFS_BootSector bs; @@ -99,12 +105,8 @@ tVFS_Node *NTFS_InitDevice(char *Device, char **Options) disk->RootNode.NumACLs = 1; disk->RootNode.ACLs = &gVFS_ACL_EveryoneRX; - disk->RootNode.ReadDir = NTFS_ReadDir; - disk->RootNode.FindDir = NTFS_FindDir; - disk->RootNode.MkNod = NULL; - disk->RootNode.Link = NULL; - disk->RootNode.Relink = NULL; - disk->RootNode.Close = NULL; + disk->RootNode.Type = &gNTFS_DirType; + NTFS_DumpEntry(disk, 5);