4 #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
6 /* FAT bootsector format, also used by other disk-based derivatives */
10 uint16_t bsBytesPerSec;
11 uint8_t bsSecPerClust;
12 uint16_t bsResSectors;
14 uint16_t bsRootDirEnts;
18 uint16_t bsSecPerTrack;
20 uint32_t bsHiddenSecs;
21 uint32_t bsHugeSectors;
27 uint8_t BootSignature;
32 } __attribute__ ((packed)) bs16;
40 uint8_t Reserved0[12];
43 uint8_t BootSignature;
48 } __attribute__ ((packed)) bs32;
49 } __attribute__ ((packed));
51 uint32_t NextSector; /* Pointer to the first unused sector */
52 uint16_t MaxTransfer; /* Max sectors per transfer */
54 } __attribute__ ((packed));
57 #define bsHeadLen offsetof(struct boot_sector, bsOemName)
58 #define bsCode bs32.Code /* The common safe choice */
59 #define bsCodeLen (offsetof(struct boot_sector, bsSignature) - \
60 offsetof(struct boot_sector, bsCode))