root / lab4 / .minix-src / include / i386 / partition.h @ 14
History | View | Annotate | Download (1.03 KB)
1 | 13 | up20180614 | /* Description of entry in partition table. */
|
---|---|---|---|
2 | #ifndef _PARTITION_H
|
||
3 | #define _PARTITION_H
|
||
4 | |||
5 | #include <stdint.h> |
||
6 | |||
7 | struct part_entry {
|
||
8 | uint8_t bootind; /* boot indicator 0/ACTIVE_FLAG */
|
||
9 | uint8_t start_head; /* head value for first sector */
|
||
10 | uint8_t start_sec; /* sector value + cyl bits for first sector */
|
||
11 | uint8_t start_cyl; /* track value for first sector */
|
||
12 | uint8_t sysind; /* system indicator */
|
||
13 | uint8_t last_head; /* head value for last sector */
|
||
14 | uint8_t last_sec; /* sector value + cyl bits for last sector */
|
||
15 | uint8_t last_cyl; /* track value for last sector */
|
||
16 | uint32_t lowsec; /* logical first sector */
|
||
17 | uint32_t size; /* size of partition in sectors */
|
||
18 | }; |
||
19 | |||
20 | #define ACTIVE_FLAG 0x80 /* value for active in bootind field (hd0) */ |
||
21 | #define NR_PARTITIONS 4 /* number of entries in partition table */ |
||
22 | #define PART_TABLE_OFF 0x1BE /* offset of partition table in boot sector */ |
||
23 | |||
24 | /* Partition types. */
|
||
25 | #define NO_PART 0x00 /* unused entry */ |
||
26 | #define MINIX_PART 0x81 /* Minix partition type */ |
||
27 | |||
28 | #endif /* _PARTITION_H */ |