aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-10-04 17:16:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-04 17:16:15 +0200
commit27f0e8a27584df50736398c26491c450b12fd00d (patch)
treee182ce487c08ee390fe917d0a992a0c96cf5a9c3
parentd8e4ce05039a89c2e0b41f008d74a83db45f2287 (diff)
downloadbusybox-w32-27f0e8a27584df50736398c26491c450b12fd00d.tar.gz
busybox-w32-27f0e8a27584df50736398c26491c450b12fd00d.tar.bz2
busybox-w32-27f0e8a27584df50736398c26491c450b12fd00d.zip
fdisk_aix: fix aliasing warning, comment out unused global variables
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/fdisk_aix.c40
-rw-r--r--util-linux/fdisk_gpt.c6
2 files changed, 23 insertions, 23 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;*/ /* %% */
diff --git a/util-linux/fdisk_gpt.c b/util-linux/fdisk_gpt.c
index dbe889f7c..e884e3dc1 100644
--- a/util-linux/fdisk_gpt.c
+++ b/util-linux/fdisk_gpt.c
@@ -161,7 +161,7 @@ check_gpt_label(void)
161 if (!valid_part_table_flag(MBRbuffer) 161 if (!valid_part_table_flag(MBRbuffer)
162 || first->sys_ind != LEGACY_GPT_TYPE 162 || first->sys_ind != LEGACY_GPT_TYPE
163 ) { 163 ) {
164 current_label_type = 0; 164 current_label_type = LABEL_DOS;
165 return 0; 165 return 0;
166 } 166 }
167 167
@@ -171,7 +171,7 @@ check_gpt_label(void)
171 gpt_hdr = (void *)pe.sectorbuffer; 171 gpt_hdr = (void *)pe.sectorbuffer;
172 172
173 if (gpt_hdr->magic != SWAP_LE64(GPT_MAGIC)) { 173 if (gpt_hdr->magic != SWAP_LE64(GPT_MAGIC)) {
174 current_label_type = 0; 174 current_label_type = LABEL_DOS;
175 return 0; 175 return 0;
176 } 176 }
177 177
@@ -194,7 +194,7 @@ check_gpt_label(void)
194 || SWAP_LE32(gpt_hdr->hdr_size) > sector_size 194 || SWAP_LE32(gpt_hdr->hdr_size) > sector_size
195 ) { 195 ) {
196 puts("\nwarning: unable to parse GPT disklabel\n"); 196 puts("\nwarning: unable to parse GPT disklabel\n");
197 current_label_type = 0; 197 current_label_type = LABEL_DOS;
198 return 0; 198 return 0;
199 } 199 }
200 200