]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - libdisk/pttype.h
xfsprogs update - kernel/user sync up and Ethan's Mac partition code.
[thirdparty/xfsprogs-dev.git] / libdisk / pttype.h
1
2 typedef struct {
3 unsigned char info[128]; /* Informative text string */
4 unsigned char spare0[14];
5 struct sun_info {
6 unsigned char spare1;
7 unsigned char id;
8 unsigned char spare2;
9 unsigned char flags;
10 } infos[8];
11 unsigned char spare1[246]; /* Boot information etc. */
12 unsigned short rspeed; /* Disk rotational speed */
13 unsigned short pcylcount; /* Physical cylinder count */
14 unsigned short sparecyl; /* extra sects per cylinder */
15 unsigned char spare2[4]; /* More magic... */
16 unsigned short ilfact; /* Interleave factor */
17 unsigned short ncyl; /* Data cylinder count */
18 unsigned short nacyl; /* Alt. cylinder count */
19 unsigned short ntrks; /* Tracks per cylinder */
20 unsigned short nsect; /* Sectors per track */
21 unsigned char spare3[4]; /* Even more magic... */
22 struct sun_partition {
23 u_int32_t start_cylinder;
24 u_int32_t num_sectors;
25 } partitions[8];
26 unsigned short magic; /* Magic number */
27 unsigned short csum; /* Label xor'd checksum */
28 } sun_partition;
29
30 #define SUN_LABEL_MAGIC 0xDABE
31 #define SUN_LABEL_MAGIC_SWAPPED 0xBEDA
32 #define sunlabel(x) ((sun_partition *)x)
33
34 typedef struct {
35 unsigned int magic; /* expect AIX_LABEL_MAGIC */
36 /* ... */
37 } aix_partition;
38
39 #define AIX_LABEL_MAGIC 0xc9c2d4c1
40 #define AIX_LABEL_MAGIC_SWAPPED 0xc1d4c2c9
41 #define aixlabel(x) ((aix_partition *)x)
42
43 typedef struct {
44 unsigned short magic;
45 /* ... */
46 } mac_partition;
47
48 #define MAC_LABEL_MAGIC 0x4552
49 #define MAC_PARTITION_MAGIC 0x504d
50 #define MAC_OLD_PARTITION_MAGIC 0x5453
51 #define maclabel(x) ((mac_partition *)x)