]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: aix: remove magic aixlabel macro, mark unused parameters
authorKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 15:47:08 +0000 (17:47 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 15:47:08 +0000 (17:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdiskaixlabel.c
fdisks/fdiskaixlabel.h

index 884baa6ceb173f520138844cca13daa1fe13f9e4..0f249a4387f7dd800b92d1fbbbc14b83dfbf7597 100644 (file)
@@ -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"
index ea7aebd70a2f0ef8767aab4c79d9f05a952096c3..c3af9a0e3edb14533b52216f6e8453ad0df990fb 100644 (file)
@@ -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