1#if ENABLE_FEATURE_AIX_LABEL
2
3
4
5
6
7
8typedef struct {
9 uint32_t magic;
10 uint32_t fillbytes1[124];
11 uint32_t physical_volume_id;
12 uint32_t fillbytes2[124];
13} aix_partition;
14
15#define AIX_LABEL_MAGIC 0xc9c2d4c1
16#define AIX_LABEL_MAGIC_SWAPPED 0xc1d4c2c9
17#define AIX_INFO_MAGIC 0x00072959
18#define AIX_INFO_MAGIC_SWAPPED 0x59290700
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37static void
38aix_info(void)
39{
40 puts("\n"
41"There is a valid AIX label on this disk.\n"
42"Unfortunately Linux cannot handle these disks at the moment.\n"
43"Nevertheless some advice:\n"
44"1. fdisk will destroy its contents on write.\n"
45"2. Be sure that this disk is NOT a still vital part of a volume group.\n"
46" (Otherwise you may erase the other disks as well, if unmirrored.)\n"
47"3. Before deleting this physical volume be sure to remove the disk\n"
48" logically from your AIX machine. (Otherwise you become an AIXpert).\n"
49 );
50}
51
52static int
53check_aix_label(void)
54{
55 aix_partition *aixlabel = (void*)MBRbuffer;
56
57 if (aixlabel->magic != AIX_LABEL_MAGIC
58 && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED
59 ) {
60 current_label_type = LABEL_DOS;
61
62 return 0;
63 }
64
65 update_units();
66 current_label_type = LABEL_AIX;
67 g_partitions = 1016;
68
69 aix_info();
70
71
72 return 1;
73}
74#endif
75