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 enum PartitionTypes
{
33 #define PartitionIsSupported(P) ((P)->PartitionType == PTDOS3xPrimary || \
34 (P)->PartitionType == PT_OLDDOS16Bit || (P)->PartitionType == PTDos5xPrimary)
36 typedef struct Partition
{
40 __u8 StartingCylinder
;
45 unsigned int StartingBlock
;
46 unsigned int SectorCount
;