Author: oxygene
Date: 2008-10-05 20:00:55 +0200 (Sun, 05 Oct 2008)
New Revision: 79

Modified:
   trunk/filo/fs/fat.h
   trunk/filo/fs/fsys_fat.c
Log:
FAT32 didn't work because of a minor bug in the data structure (it was
misaligned, to the type string field couldn't be found)
Also document a sanity check that confused me all the time.

Modified: trunk/filo/fs/fat.h
===================================================================
--- trunk/filo/fs/fat.h 2008-10-05 18:00:00 UTC (rev 78)
+++ trunk/filo/fs/fat.h 2008-10-05 18:00:55 UTC (rev 79)
@@ -49,7 +49,7 @@
        __u32   root_cluster;   /* first cluster in root directory */
        __u16   info_sector;    /* filesystem info sector */
        __u16   backup_boot;    /* backup boot sector */
-       __u16   reserved2[12];  /* Reserved */
+       __u8    reserved2[12];  /* Reserved */
        /* from here on it looks like the fat12/fat16 code */
        __u8    drive_number;   /* Physical Drive Number */
        __u8    reserved;       /* "current head" */

Modified: trunk/filo/fs/fsys_fat.c
===================================================================
--- trunk/filo/fs/fsys_fat.c    2008-10-05 18:00:00 UTC (rev 78)
+++ trunk/filo/fs/fsys_fat.c    2008-10-05 18:00:55 UTC (rev 79)
@@ -110,6 +110,8 @@
   if (!bpb.fat_length)
     {
       /* This is a FAT32 */
+
+      /* FAT32 should have 0 in this field, as its root directory can grow 
dynamically now */
       if (FAT_CVT_U16(bpb.dir_entries))
        return 0;
       


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to