#include <vfs.h>\r
#include "fs_fat.h"\r
\r
-#define DEBUG 0\r
+#define DEBUG 1\r
#define VERBOSE 1\r
\r
#if DEBUG\r
return 0;\r
}\r
\r
-/* Reads the boot sector of a disk and prepares the structures for it\r
+/**\r
+ * \fn tVFS_Node *FAT_InitDevice(char *Device, char *options)\r
+ * \brief Reads the boot sector of a disk and prepares the structures for it\r
*/\r
tVFS_Node *FAT_InitDevice(char *Device, char *options)\r
{\r
#endif\r
\r
//Get Name\r
- //puts(" Name: ");\r
if(diskInfo->type == FAT32) {\r
for(i=0;i<11;i++)\r
diskInfo->name[i] = (bs->spec.fat32.label[i] == ' ' ? '\0' : bs->spec.fat32.label[i]);\r
diskInfo->name[i] = (bs->spec.fat16.label[i] == ' ' ? '\0' : bs->spec.fat16.label[i]);\r
}\r
diskInfo->name[11] = '\0';\r
- //puts(diskInfo->name); putch('\n');\r
\r
//Compute Root directory offset\r
if(diskInfo->type == FAT32)\r
Log(" FAT_InitDisk: Inode Cache handle is %i\n", gFAT_Disks[giFAT_PartCount].inodeHandle);\r
#endif\r
\r
- //== VFS Interface\r
+ // == VFS Interface\r
node = &gFAT_Disks[giFAT_PartCount].rootNode;\r
- //node->Name = gFAT_Disks[giFAT_PartCount].name;\r
node->Inode = diskInfo->rootOffset;\r
- node->Size = bs->files_in_root; //Unknown - To be set on readdir\r
+ node->Size = bs->files_in_root; // Unknown - To be set on readdir\r
node->ImplInt = giFAT_PartCount;\r
\r
node->ReferenceCount = 1;\r
\r
- node->UID = 0; node->GID= 0;\r
+ node->UID = 0; node->GID = 0;\r
node->NumACLs = 1;\r
node->ACLs = &gVFS_ACL_EveryoneRWX;\r
node->Flags = VFS_FFLAG_DIRECTORY;\r