Changes in uspace/srv/fs/fat/fat_fat.h [991f645:d260a95] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.h
r991f645 rd260a95 29 29 /** @addtogroup fs 30 30 * @{ 31 */ 31 */ 32 32 33 33 #ifndef FAT_FAT_FAT_H_ … … 40 40 #define FAT1 0 41 41 42 #define FAT_CLST_RES0 0x0000 43 #define FAT_CLST_RES1 0x0001 44 #define FAT_CLST_FIRST 0x0002 45 #define FAT_CLST_BAD 0xfff7 46 #define FAT_CLST_LAST1 0xfff8 47 #define FAT_CLST_LAST8 0xffff 42 #define FAT_CLST_RES0 0x0000 43 #define FAT_CLST_RES1 0x0001 44 #define FAT_CLST_FIRST 0x0002 45 46 #define FAT12_CLST_BAD 0x0ff7 47 #define FAT12_CLST_LAST1 0x0ff8 48 #define FAT12_CLST_LAST8 0x0fff 49 #define FAT16_CLST_BAD 0xfff7 50 #define FAT16_CLST_LAST1 0xfff8 51 #define FAT16_CLST_LAST8 0xffff 52 53 #define FAT12_CLST_MAX 4085 54 #define FAT16_CLST_MAX 65525 48 55 49 56 /* internally used to mark root directory's parent */ … … 51 58 /* internally used to mark root directory */ 52 59 #define FAT_CLST_ROOT FAT_CLST_RES1 60 61 /* 62 * Convenience macros for computing some frequently used values from the 63 * primitive boot sector members. 64 */ 65 #define RDS(bs) ((sizeof(fat_dentry_t) * RDE((bs))) / BPS((bs))) + \ 66 (((sizeof(fat_dentry_t) * RDE((bs))) % BPS((bs))) != 0) 67 #define SSA(bs) (RSCNT((bs)) + FATCNT((bs)) * SF((bs)) + RDS(bs)) 68 #define DS(bs) (TS(bs) - SSA(bs)) 69 #define CC(bs) (DS(bs) / SPC(bs)) 70 71 #define FAT_IS_FAT12(bs) (CC(bs) < FAT12_CLST_MAX) 72 #define FAT_IS_FAT16(bs) \ 73 ((CC(bs) >= FAT12_CLST_MAX) && (CC(bs) < FAT16_CLST_MAX)) 74 75 #define FAT_CLST_LAST1(bs) \ 76 (FAT_IS_FAT12(bs) ? FAT12_CLST_LAST1 : FAT16_CLST_LAST1) 77 #define FAT_CLST_LAST8(bs) \ 78 (FAT_IS_FAT12(bs) ? FAT12_CLST_LAST8 : FAT16_CLST_LAST8) 79 #define FAT_CLST_BAD(bs) \ 80 (FAT_IS_FAT12(bs) ? FAT12_CLST_BAD : FAT16_CLST_BAD) 53 81 54 82 /* forward declarations */
Note:
See TracChangeset
for help on using the changeset viewer.