X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FFilesystems%2FFAT%2Fcommon.h;h=09b94a65bd2e206b44239368637a65a36d6db8d3;hb=015f48988e0ff398409d71dfc692005ab439490a;hp=79513a9644b80e16966e06b829b889b63f11a882;hpb=11dbd684e9a3d907d43d71a3145205f1a86992fb;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Filesystems/FAT/common.h b/KernelLand/Modules/Filesystems/FAT/common.h index 79513a96..09b94a65 100644 --- a/KernelLand/Modules/Filesystems/FAT/common.h +++ b/KernelLand/Modules/Filesystems/FAT/common.h @@ -43,10 +43,11 @@ struct sFAT_VolInfo char name[12]; //!< Volume Name (With NULL Terminator) Uint32 firstDataSect; //!< First data sector Uint32 rootOffset; //!< Root Offset (clusters) + Uint32 RootSector; //!< Root Offset (sectors) Uint32 ClusterCount; //!< Total Cluster Count fat_bootsect bootsect; //!< Boot Sector tVFS_Node rootNode; //!< Root Node - int BytesPerCluster; + size_t BytesPerCluster; tMutex lNodeCache; tFAT_CachedNode *NodeCache; @@ -97,6 +98,7 @@ extern int FAT_int_DerefNode(tVFS_Node *Node); extern void FAT_int_ClearNodeCache(tFAT_VolInfo *Disk); // --- FAT Access --- +#define GETFATVALUE_EOC 0xFFFFFFFF extern Uint32 FAT_int_GetFatValue(tFAT_VolInfo *Disk, Uint32 Cluster); #if SUPPORT_WRITE extern Uint32 FAT_int_AllocateCluster(tFAT_VolInfo *Disk, Uint32 Previous); @@ -106,13 +108,13 @@ extern void FAT_int_ReadCluster(tFAT_VolInfo *Disk, Uint32 Cluster, int Length, extern void FAT_int_WriteCluster(tFAT_VolInfo *Disk, Uint32 Cluster, const void *Buffer); // --- Directory Access --- -extern char *FAT_ReadDir(tVFS_Node *Node, int ID); -extern tVFS_Node *FAT_FindDir(tVFS_Node *Node, const char *Name); +extern int FAT_ReadDir(tVFS_Node *Node, int ID, char Dest[FILENAME_MAX]); +extern tVFS_Node *FAT_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); extern tVFS_Node *FAT_GetNodeFromINode(tVFS_Node *Root, Uint64 Inode); extern int FAT_int_GetEntryByCluster(tVFS_Node *DirNode, Uint32 Cluster, fat_filetable *Entry); #if SUPPORT_WRITE extern int FAT_int_WriteDirEntry(tVFS_Node *Node, int ID, fat_filetable *Entry); -extern int FAT_Mknod(tVFS_Node *Node, const char *Name, Uint Flags); +extern tVFS_Node *FAT_Mknod(tVFS_Node *Node, const char *Name, Uint Flags); extern int FAT_Link(tVFS_Node *DirNode, const char *NewName, tVFS_Node *Node); extern int FAT_Unlink(tVFS_Node *DirNode, const char *OldName); #endif