X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=KernelLand%2FModules%2FFilesystems%2FFAT%2Ffat.c;h=3708e4400dc6880e08950be3077dd9178d065c8b;hb=fe5d1be2f1903383a4eeb92fdbc9ef644b6d32ce;hp=f5d19161c35681360e0eca1b4577112c88e65f8a;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Filesystems/FAT/fat.c b/KernelLand/Modules/Filesystems/FAT/fat.c index f5d19161..3708e440 100644 --- a/KernelLand/Modules/Filesystems/FAT/fat.c +++ b/KernelLand/Modules/Filesystems/FAT/fat.c @@ -67,10 +67,10 @@ Uint32 FAT_int_FreeCluster(tFAT_VolInfo *Disk, Uint32 Cluster); #endif void FAT_int_ReadCluster(tFAT_VolInfo *Disk, Uint32 Cluster, int Length, void *Buffer); // --- File IO -Uint64 FAT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); +size_t FAT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer); #if SUPPORT_WRITE void FAT_int_WriteCluster(tFAT_VolInfo *Disk, Uint32 Cluster, void *Buffer); -Uint64 FAT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); +size_t FAT_Write(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer); #endif // --- Directory IO char *FAT_ReadDir(tVFS_Node *Node, int ID); @@ -144,7 +144,7 @@ tVFS_Node *FAT_InitDevice(const char *Device, const char **Options) VFS_ReadAt(diskInfo->fileHandle, 0, 512, bs); if(bs->bps == 0 || bs->spc == 0) { - Log_Notice("FAT", "Error in FAT Boot Sector"); + Log_Notice("FAT", "Error in FAT Boot Sector (zero BPS/SPC)"); return NULL; } @@ -616,10 +616,9 @@ void FAT_int_ReadCluster(tFAT_VolInfo *Disk, Uint32 Cluster, int Length, void *B * ==================== */ /** - * \fn Uint64 FAT_Read(tVFS_Node *node, Uint64 offset, Uint64 length, void *buffer) * \brief Reads data from a specified file */ -Uint64 FAT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) +size_t FAT_Read(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer) { int preSkip, count; Uint64 final_bytes; @@ -628,7 +627,7 @@ Uint64 FAT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) char tmpBuf[disk->BytesPerCluster]; int bpc = disk->BytesPerCluster; - ENTER("pNode Xoffset Xlength pbuffer", Node, Offset, Length, Buffer); + ENTER("pNode Xoffset xlength pbuffer", Node, Offset, Length, Buffer); // Sanity Check offset if(Offset > Node->Size) { @@ -754,7 +753,7 @@ void FAT_int_WriteCluster(tFAT_VolInfo *Disk, Uint32 Cluster, void *Buffer) * \param Length Size of data to write * \param Buffer Data source */ -Uint64 FAT_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) +size_t FAT_Write(tVFS_Node *Node, off_t Offset, size_t Length, void *Buffer) { tFAT_VolInfo *disk = Node->ImplPtr; char tmpBuf[disk->BytesPerCluster];