1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- struct bootsector33 {
- u_int8_t bsJump[3];
- int8_t bsOemName[8];
- int8_t bsBPB[19];
- int8_t bsDriveNumber;
- int8_t bsBootCode[479];
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
- #define BOOTSIG0 0x55
- #define BOOTSIG1 0xaa
- };
- struct extboot {
- int8_t exDriveNumber;
- int8_t exReserved1;
- int8_t exBootSignature;
- #define EXBOOTSIG 0x29
- int8_t exVolumeID[4];
- int8_t exVolumeLabel[11];
- int8_t exFileSysType[8];
- };
- struct bootsector50 {
- u_int8_t bsJump[3];
- int8_t bsOemName[8];
- int8_t bsBPB[25];
- int8_t bsExt[26];
- int8_t bsBootCode[448];
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
- #define BOOTSIG0 0x55
- #define BOOTSIG1 0xaa
- };
- struct bootsector710 {
- u_int8_t bsJump[3];
- int8_t bsOEMName[8];
- int8_t bsPBP[53];
- int8_t bsExt[26];
- int8_t bsBootCode[418];
- u_int8_t bsBootSectSig2;
- u_int8_t bsBootSectSig3;
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
- #define BOOTSIG0 0x55
- #define BOOTSIG1 0xaa
- #define BOOTSIG2 0
- #define BOOTSIG3 0
- };
- union bootsector {
- struct bootsector33 bs33;
- struct bootsector50 bs50;
- struct bootsector710 bs710;
- };
- #if 0
- #define bsBytesPerSec bsBPB.bpbBytesPerSec
- #define bsSectPerClust bsBPB.bpbSectPerClust
- #define bsResSectors bsBPB.bpbResSectors
- #define bsFATS bsBPB.bpbFATS
- #define bsRootDirEnts bsBPB.bpbRootDirEnts
- #define bsSectors bsBPB.bpbSectors
- #define bsMedia bsBPB.bpbMedia
- #define bsFATsecs bsBPB.bpbFATsecs
- #define bsSectPerTrack bsBPB.bpbSectPerTrack
- #define bsHeads bsBPB.bpbHeads
- #define bsHiddenSecs bsBPB.bpbHiddenSecs
- #define bsHugeSectors bsBPB.bpbHugeSectors
- #endif
|