1 /*
2  *  fs/partitions/mac.h
3  */
4 
5 #define MAC_PARTITION_MAGIC	0x504d
6 
7 /* type field value for A/UX or other Unix partitions */
8 #define APPLE_AUX_TYPE	"Apple_UNIX_SVR2"
9 
10 struct mac_partition {
11 	__u16	signature;	/* expected to be MAC_PARTITION_MAGIC */
12 	__u16	res1;
13 	__u32	map_count;	/* # blocks in partition map */
14 	__u32	start_block;	/* absolute starting block # of partition */
15 	__u32	block_count;	/* number of blocks in partition */
16 	char	name[32];	/* partition name */
17 	char	type[32];	/* string type description */
18 	__u32	data_start;	/* rel block # of first data block */
19 	__u32	data_count;	/* number of data blocks */
20 	__u32	status;		/* partition status bits */
21 	__u32	boot_start;
22 	__u32	boot_size;
23 	__u32	boot_load;
24 	__u32	boot_load2;
25 	__u32	boot_entry;
26 	__u32	boot_entry2;
27 	__u32	boot_cksum;
28 	char	processor[16];	/* identifies ISA of boot */
29 	/* there is more stuff after this that we don't need */
30 };
31 
macpart_fix_string(char * stg,int len)32 static inline void macpart_fix_string(char *stg, int len)
33 {
34 	int i;
35 
36 	for (i = len - 1; i >= 0 && stg[i] == ' '; i--)
37 		stg[i] = 0;
38 }
39 
40 #define MAC_STATUS_BOOTABLE	8	/* partition is bootable */
41 
42 #define MAC_DRIVER_MAGIC	0x4552
43 
44 /* Driver descriptor structure, in block 0 */
45 struct mac_driver_desc {
46 	__u16	signature;	/* expected to be MAC_DRIVER_MAGIC */
47 	__u16	block_size;
48 	__u32	block_count;
49     /* ... more stuff */
50 };
51 
52 int mac_partition(struct gendisk *hd, struct block_device *bdev, unsigned long fsec, int first_part_minor);
53