Bump to version 1.22.1
[platform/upstream/busybox.git] / util-linux / fdisk_aix.c
index 2402e29..ee5df50 100644 (file)
@@ -1,8 +1,8 @@
 #if ENABLE_FEATURE_AIX_LABEL
 /*
  * Copyright (C) Andreas Neuper, Sep 1998.
- *      This file may be redistributed under
- *      the terms of the GNU Public License.
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
  */
 
 typedef struct {
@@ -29,8 +29,8 @@ typedef struct {
   *      Some fixes
 */
 
-static int aix_other_endian;
-static short aix_volumes = 1;
+static smallint aix_other_endian; /* bool */
+static smallint aix_volumes = 1; /* max 15 */
 
 /*
  * only dealing with free blocks here
@@ -39,34 +39,32 @@ static short aix_volumes = 1;
 static void
 aix_info(void)
 {
-       puts(
-               _("\n\tThere is a valid AIX label on this disk.\n"
-               "\tUnfortunately Linux cannot handle these\n"
-               "\tdisks at the moment.  Nevertheless some\n"
-               "\tadvice:\n"
-               "\t1. fdisk will destroy its contents on write.\n"
-               "\t2. Be sure that this disk is NOT a still vital\n"
-               "\t   part of a volume group. (Otherwise you may\n"
-               "\t   erase the other disks as well, if unmirrored.)\n"
-               "\t3. Before deleting this physical volume be sure\n"
-               "\t   to remove the disk logically from your AIX\n"
-               "\t   machine.  (Otherwise you become an AIXpert).")
+       puts("\n"
+"There is a valid AIX label on this disk.\n"
+"Unfortunately Linux cannot handle these disks at the moment.\n"
+"Nevertheless some advice:\n"
+"1. fdisk will destroy its contents on write.\n"
+"2. Be sure that this disk is NOT a still vital part of a volume group.\n"
+"   (Otherwise you may erase the other disks as well, if unmirrored.)\n"
+"3. Before deleting this physical volume be sure to remove the disk\n"
+"   logically from your AIX machine. (Otherwise you become an AIXpert).\n"
        );
 }
 
 static int
 check_aix_label(void)
 {
-       if (aixlabel->magic != AIX_LABEL_MAGIC &&
-               aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED) {
+       if (aixlabel->magic != AIX_LABEL_MAGIC
+        && aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED
+       ) {
                current_label_type = 0;
                aix_other_endian = 0;
                return 0;
        }
        aix_other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED);
        update_units();
-       current_label_type = label_aix;
-       partitions = 1016;
+       current_label_type = LABEL_AIX;
+       g_partitions = 1016;
        aix_volumes = 15;
        aix_info();
        /*aix_nolabel();*/              /* %% */