summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.c
diff options
context:
space:
mode:
authorKarel Zak2013-02-07 12:18:27 +0100
committerKarel Zak2013-03-11 13:00:56 +0100
commit7375423cda6d24c8b94617d089bff3a5c91fd0cb (patch)
treeac7e8979efd4556ef9a196136612b5b6a464093c /fdisks/fdisk.c
parentfdisk: (sun) remove dead code (diff)
downloadkernel-qcow2-util-linux-7375423cda6d24c8b94617d089bff3a5c91fd0cb.tar.gz
kernel-qcow2-util-linux-7375423cda6d24c8b94617d089bff3a5c91fd0cb.tar.xz
kernel-qcow2-util-linux-7375423cda6d24c8b94617d089bff3a5c91fd0cb.zip
fdisk: add 'G' to create SGI label to the main menu
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>
Diffstat (limited to 'fdisks/fdisk.c')
-rw-r--r--fdisks/fdisk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 453583ee1..33533c49c 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -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);