Upload Tizen:Base source
[framework/base/util-linux-ng.git] / fdisk / fdiskmaclabel.h
1 #ifndef FDISK_MAC_LABEL_H
2 #define FDISK_MAC_LABEL_H
3
4 #include <sys/types.h>
5 /*
6  * Copyright (C) Andreas Neuper, Sep 1998.
7  *      This file may be redistributed under
8  *      the terms of the GNU Public License.
9  */
10
11 typedef struct {
12         unsigned int  magic;        /* expect MAC_LABEL_MAGIC */
13         unsigned int  fillbytes1[124];
14         unsigned int  physical_volume_id;
15         unsigned int  fillbytes2[124];
16 } mac_partition;
17
18 /* MAC magic number only 16bits, do I always know that there are 0200
19  * following? Problem, after magic the uint16_t res1; follows, I donnno know
20  * about the 200k */
21 #define MAC_LABEL_MAGIC         0x45520000
22 #define MAC_LABEL_MAGIC_2       0x50530000
23 #define MAC_LABEL_MAGIC_3       0x504d0000
24
25 #define MAC_LABEL_MAGIC_SWAPPED         0x00002554
26
27 #define MAC_LABEL_MAGIC_2_SWAPPED       0x00003505
28 #define MAC_LABEL_MAGIC_3_SWAPPED       0x0000d405
29
30 /* fdisk.c */
31 #define maclabel ((mac_partition *)MBRbuffer)
32
33 /* fdiskmaclabel.c */
34 extern struct   systypes mac_sys_types[];
35 extern void     mac_nolabel( void );
36 extern int      check_mac_label( void );
37
38 #endif /* FDISK_MAC_LABEL_H */
39