]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: add 'G' to create SGI label to the main menu
authorKarel Zak <kzak@redhat.com>
Thu, 7 Feb 2013 11:18:27 +0000 (12:18 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 12:00:56 +0000 (13:00 +0100)
For unknown reason you have to go to the expert menu to create SGI
label.  It's inconsistent behavior as we have all "create label"
operations in the main menu.

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisk.c

index 453583ee190d51123e31fa7d51c7bc9f3b953769..33533c49c9b4824485f91a9242edbe9a32066c60 100644 (file)
@@ -75,7 +75,8 @@ static const struct menulist_descr menulist[] = {
        {'e', N_("list extended partitions"), {0, FDISK_DISKLABEL_DOS}},
        {'e', N_("edit drive data"), {FDISK_DISKLABEL_OSF, 0}},
        {'f', N_("fix partition order"), {0, FDISK_DISKLABEL_DOS}},
-       {'g', N_("create an IRIX (SGI) partition table"), {0, FDISK_DISKLABEL_ANY}},
+       {'G', N_("create an IRIX (SGI) partition table"), {~FDISK_DISKLABEL_OSF, 0}},
+       {'g', N_("create an IRIX (SGI) partition table"), {0, FDISK_DISKLABEL_ANY}}, /* for backward compatibility only */
        {'g', N_("create a new empty GPT partition table"), {~FDISK_DISKLABEL_OSF, 0}},
        {'h', N_("change number of heads"), {0, FDISK_DISKLABEL_DOS | FDISK_DISKLABEL_SUN}},
        {'i', N_("change interleave factor"), {0, FDISK_DISKLABEL_SUN}},
@@ -1111,6 +1112,9 @@ static void command_prompt(struct fdisk_context *cxt)
                case 'g':
                        fdisk_create_disklabel(cxt, "gpt");
                        break;
+               case 'G':
+                       fdisk_create_disklabel(cxt, "sgi");
+                       break;
                case 'i':
                        if (fdisk_is_disklabel(cxt, SGI))
                                create_sgiinfo(cxt);