source: trunk/minix/commands/i386/mtools-3.9.7/partition.h@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 944 bytes
Line 
1typedef struct hsc {
2 unsigned char byte0;
3 unsigned char head; /* starting head */
4 unsigned char sector; /* starting sector */
5 unsigned char cyl; /* starting cylinder */
6} hsc;
7
8#define head(x) ((x).head)
9#define sector(x) ((x).sector & 0x3f)
10#define cyl(x) ((x).cyl | (((x).sector & 0xc0)<<2))
11
12#define BEGIN(p) _DWORD((p).start_sect)
13#define END(p) (_DWORD((p).start_sect)+(_DWORD((p).nr_sects)))
14
15
16struct partition {
17 hsc start;
18 hsc end;
19 unsigned char start_sect[4]; /* starting sector counting from 0 */
20 unsigned char nr_sects[4]; /* nr of sectors in partition */
21};
22
23#define boot_ind start.byte0
24#define sys_ind end.byte0
25
26int consistencyCheck(struct partition *partTable, int doprint, int verbose,
27 int *has_activated, int *last_end, int *j,
28 struct device *used_dev, int target_partition);
29
30void setBeginEnd(struct partition *partTable, int begin, int end,
31 int heads, int sector, int activate, int type);
Note: See TracBrowser for help on using the repository browser.