From: Karel Zak Date: Thu, 26 Jul 2012 15:47:08 +0000 (+0200) Subject: fdisk: aix: remove magic aixlabel macro, mark unused parameters X-Git-Tag: v2.22-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b37e2c21ccb467ade5ad54a2d9eae73b6df67f3e;p=thirdparty%2Futil-linux.git fdisk: aix: remove magic aixlabel macro, mark unused parameters Signed-off-by: Karel Zak --- diff --git a/fdisks/fdiskaixlabel.c b/fdisks/fdiskaixlabel.c index 884baa6ceb..0f249a4387 100644 --- a/fdisks/fdiskaixlabel.c +++ b/fdisks/fdiskaixlabel.c @@ -14,8 +14,6 @@ #include "fdiskaixlabel.h" #include "nls.h" -#define aixlabel ((aix_partition *)cxt->firstsector) - static int other_endian = 0; static short volumes=1; @@ -43,6 +41,8 @@ aix_info( void ) { void aix_nolabel(struct fdisk_context *cxt) { + struct aix_partition *aixlabel = (struct aix_partition *) cxt->firstsector; + aixlabel->magic = 0; partitions = 4; fdisk_zeroize_firstsector(cxt); @@ -51,6 +51,8 @@ aix_nolabel(struct fdisk_context *cxt) static int aix_probe_label(struct fdisk_context *cxt) { + struct aix_partition *aixlabel = (struct aix_partition *) cxt->firstsector; + if (aixlabel->magic != AIX_LABEL_MAGIC && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED) { other_endian = 0; @@ -65,7 +67,10 @@ static int aix_probe_label(struct fdisk_context *cxt) return 1; } -static void aix_add_partition(struct fdisk_context *cxt, int partnum, int parttype) +static void aix_add_partition( + struct fdisk_context *cxt __attribute__((__unused__)), + int partnum __attribute__((__unused__)), + int parttype __attribute__((__unused__))) { printf(_("\tSorry - this fdisk cannot handle AIX disk labels." "\n\tIf you want to add DOS-type partitions, create" diff --git a/fdisks/fdiskaixlabel.h b/fdisks/fdiskaixlabel.h index ea7aebd70a..c3af9a0e3e 100644 --- a/fdisks/fdiskaixlabel.h +++ b/fdisks/fdiskaixlabel.h @@ -8,12 +8,12 @@ * the terms of the GNU Public License. */ -typedef struct { +struct aix_partition { unsigned int magic; /* expect AIX_LABEL_MAGIC */ unsigned int fillbytes1[124]; unsigned int physical_volume_id; unsigned int fillbytes2[124]; -} aix_partition; +}; #define AIX_LABEL_MAGIC 0xc9c2d4c1 #define AIX_LABEL_MAGIC_SWAPPED 0xc1d4c2c9