2 *** Partition.h - defines and structs for harddrive partition info
4 *** 05/30/98 RJJ Created
10 #define PARTITION_MAGIC 0xaa55
11 #define PART_MAGIC_OFFSET 0x01fe
12 #define PARTITION_OFFSET 0x01be
13 #define PARTITION_TBL_SIZE 4
14 #define PTCHSToLBA(c, h, s, scnt, hcnt) ((s) & 0x3f) + \
15 (scnt) * ( (h) + (hcnt) * ((c) | (((s) & 0xc0) << 2)))
16 #define PTLBAToCHS(lba, c, h, s, scnt, hcnt) ( \
17 (s) = (lba) % (scnt) + 1, \
19 (h) = (lba) % (hcnt), \
22 (s) |= ((lba) >> 2) & 0xc0)
25 typedef struct Partition
{
26 unsigned char BootFlags
;
27 unsigned char StartingHead
;
28 unsigned char StartingSector
;
29 unsigned char StartingCylinder
;
30 unsigned char PartitionType
;
31 unsigned char EndingHead
;
32 unsigned char EndingSector
;
33 unsigned char EndingCylinder
;
34 unsigned int StartingBlock
;
35 unsigned int SectorCount
;