From: John Hodge Date: Sat, 26 Sep 2009 01:57:23 +0000 (+0800) Subject: Re-enabled debug in FAT to find bug in ReadDir X-Git-Tag: rel0.06~497 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=0d8269e320f58621cfe393cd7ce9b8e8544e2f9c;p=tpg%2Facess2.git Re-enabled debug in FAT to find bug in ReadDir --- diff --git a/Kernel/vfs/fs/fat.c b/Kernel/vfs/fs/fat.c index d42a1b00..c0c3fbab 100644 --- a/Kernel/vfs/fs/fat.c +++ b/Kernel/vfs/fs/fat.c @@ -8,7 +8,7 @@ #include #include "fs_fat.h" -#define DEBUG 0 +#define DEBUG 1 #define VERBOSE 1 #if DEBUG @@ -73,7 +73,9 @@ int FAT_Install(char **Arguments) return 0; } -/* Reads the boot sector of a disk and prepares the structures for it +/** + * \fn tVFS_Node *FAT_InitDevice(char *Device, char *options) + * \brief Reads the boot sector of a disk and prepares the structures for it */ tVFS_Node *FAT_InitDevice(char *Device, char *options) { @@ -146,7 +148,6 @@ tVFS_Node *FAT_InitDevice(char *Device, char *options) #endif //Get Name - //puts(" Name: "); if(diskInfo->type == FAT32) { for(i=0;i<11;i++) diskInfo->name[i] = (bs->spec.fat32.label[i] == ' ' ? '\0' : bs->spec.fat32.label[i]); @@ -156,7 +157,6 @@ tVFS_Node *FAT_InitDevice(char *Device, char *options) diskInfo->name[i] = (bs->spec.fat16.label[i] == ' ' ? '\0' : bs->spec.fat16.label[i]); } diskInfo->name[11] = '\0'; - //puts(diskInfo->name); putch('\n'); //Compute Root directory offset if(diskInfo->type == FAT32) @@ -224,16 +224,15 @@ tVFS_Node *FAT_InitDevice(char *Device, char *options) Log(" FAT_InitDisk: Inode Cache handle is %i\n", gFAT_Disks[giFAT_PartCount].inodeHandle); #endif - //== VFS Interface + // == VFS Interface node = &gFAT_Disks[giFAT_PartCount].rootNode; - //node->Name = gFAT_Disks[giFAT_PartCount].name; node->Inode = diskInfo->rootOffset; - node->Size = bs->files_in_root; //Unknown - To be set on readdir + node->Size = bs->files_in_root; // Unknown - To be set on readdir node->ImplInt = giFAT_PartCount; node->ReferenceCount = 1; - node->UID = 0; node->GID= 0; + node->UID = 0; node->GID = 0; node->NumACLs = 1; node->ACLs = &gVFS_ACL_EveryoneRWX; node->Flags = VFS_FFLAG_DIRECTORY;