Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 875edff6 in mainline for uspace/srv/fs/fat/fat.h


Ignore:
Timestamp:
2011-04-30T11:22:28Z (12 years ago)
Author:
Oleg Romanenko <romanenko.oleg@…>
Branches:
lfn, master, serial
Children:
aa2ea13
Parents:
cb052b4
Message:

It is possible to mount FAT32 file system.
Changes:

  1. 32bit fat_cluster_t
  2. Change macros SF(bs) to add support FAT32 sectors per fat value
  3. New macros (FAT_CLST_SIZE) for determining size of FAT cluster (2 or 4 bytes)
  4. New macros (FAT_MASK) for determining necessary mask for cluster value depending on FAT type
  5. fat_get_cluster support FAT32 and correctly return cluster value
  6. Change fat_sanity_check() to add support FAT32. Wrapping explicit use of br→(value) with macros.

TODO need to wrap all explicit use of br→() with appropriated macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat.h

    rcb052b4 r875edff6  
    5555#define RSCNT(bs)       uint16_t_le2host((bs)->rscnt)
    5656#define FATCNT(bs)      (bs)->fatcnt
    57 #define SF(bs)          uint16_t_le2host((bs)->sec_per_fat)
     57#define SF(bs)          (uint16_t_le2host((bs)->sec_per_fat) !=0 ? \
     58    uint16_t_le2host((bs)->sec_per_fat) : \
     59    uint32_t_le2host(bs->fat32.sectors_per_fat))
    5860#define RDE(bs)         uint16_t_le2host((bs)->root_ent_max)
    5961#define TS(bs)          (uint16_t_le2host((bs)->totsec16) != 0 ? \
Note: See TracChangeset for help on using the changeset viewer.