summaryrefslogtreecommitdiff
path: root/util-linux/fdisk_aix.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-01-08 12:30:49 +0000
committerRon Yorston <rmy@pobox.com>2020-01-08 12:30:49 +0000
commita9271a8e97e6e7be5285330d5f19352decabf807 (patch)
treebf3c4464c369a15a46454792dac167505f74769f /util-linux/fdisk_aix.c
parentb0b7ab792bc1f45963f4b84b94faaf05054e1613 (diff)
parent9ec836c033fc6e55e80f3309b3e05acdf09bb297 (diff)
downloadbusybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.gz
busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.bz2
busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'util-linux/fdisk_aix.c')
-rw-r--r--util-linux/fdisk_aix.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/util-linux/fdisk_aix.c b/util-linux/fdisk_aix.c
index ee5df50e5..0a5e818fe 100644
--- a/util-linux/fdisk_aix.c
+++ b/util-linux/fdisk_aix.c
@@ -6,10 +6,10 @@
6 */ 6 */
7 7
8typedef struct { 8typedef struct {
9 unsigned int magic; /* expect AIX_LABEL_MAGIC */ 9 uint32_t magic; /* expect AIX_LABEL_MAGIC */
10 unsigned int fillbytes1[124]; 10 uint32_t fillbytes1[124];
11 unsigned int physical_volume_id; 11 uint32_t physical_volume_id;
12 unsigned int fillbytes2[124]; 12 uint32_t fillbytes2[124];
13} aix_partition; 13} aix_partition;
14 14
15#define AIX_LABEL_MAGIC 0xc9c2d4c1 15#define AIX_LABEL_MAGIC 0xc9c2d4c1
@@ -17,20 +17,18 @@ typedef struct {
17#define AIX_INFO_MAGIC 0x00072959 17#define AIX_INFO_MAGIC 0x00072959
18#define AIX_INFO_MAGIC_SWAPPED 0x59290700 18#define AIX_INFO_MAGIC_SWAPPED 0x59290700
19 19
20#define aixlabel ((aix_partition *)MBRbuffer)
21
22
23/* 20/*
24 Changes: 21 * Changes:
25 * 1999-03-20 Arnaldo Carvalho de Melo <acme@conectiva.com.br> 22 * 1999-03-20 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
26 * Internationalization 23 * Internationalization
27 * 24 *
28 * 2003-03-20 Phillip Kesling <pkesling@sgi.com> 25 * 2003-03-20 Phillip Kesling <pkesling@sgi.com>
29 * Some fixes 26 * Some fixes
30*/ 27 */
31 28
32static smallint aix_other_endian; /* bool */ 29// Write-only vars, unfinished code?
33static smallint aix_volumes = 1; /* max 15 */ 30//static smallint aix_other_endian; /* bool */
31//static smallint aix_volumes = 1; /* max 15 */
34 32
35/* 33/*
36 * only dealing with free blocks here 34 * only dealing with free blocks here
@@ -54,18 +52,20 @@ aix_info(void)
54static int 52static int
55check_aix_label(void) 53check_aix_label(void)
56{ 54{
55 aix_partition *aixlabel = (void*)MBRbuffer;
56
57 if (aixlabel->magic != AIX_LABEL_MAGIC 57 if (aixlabel->magic != AIX_LABEL_MAGIC
58 && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED 58 && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED
59 ) { 59 ) {
60 current_label_type = 0; 60 current_label_type = LABEL_DOS;
61 aix_other_endian = 0; 61// aix_other_endian = 0;
62 return 0; 62 return 0;
63 } 63 }
64 aix_other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED); 64// aix_other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED);
65 update_units(); 65 update_units();
66 current_label_type = LABEL_AIX; 66 current_label_type = LABEL_AIX;
67 g_partitions = 1016; 67 g_partitions = 1016;
68 aix_volumes = 15; 68// aix_volumes = 15;
69 aix_info(); 69 aix_info();
70 /*aix_nolabel();*/ /* %% */ 70 /*aix_nolabel();*/ /* %% */
71 /*aix_label = 1;*/ /* %% */ 71 /*aix_label = 1;*/ /* %% */