]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: make internal command line case sensitive
authorKarel Zak <kzak@redhat.com>
Fri, 17 May 2013 13:26:31 +0000 (15:26 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:55 +0000 (16:46 +0200)
Hey, this is Linux, year 2013...

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

index 0034b5240bdc91fb02c0d9f929869e315136e22e..8734d5c9cc035bdb62a5170c2134a579c2b0f8c0 100644 (file)
@@ -730,7 +730,7 @@ expert_command_prompt(struct fdisk_context *cxt)
                assert(cxt->label);
 
                putchar('\n');
-               c = tolower(read_char(cxt, _("Expert command (m for help): ")));
+               c = read_char(cxt, _("Expert command (m for help): "));
                switch (c) {
                case 'a':
                        if (fdisk_is_disklabel(cxt, SUN))
@@ -765,6 +765,8 @@ expert_command_prompt(struct fdisk_context *cxt)
                                dos_fix_partition_table_order(cxt);
                        break;
                case 'g':
+                       /* Deprecated, use 'G' in main menu, just for backward
+                        * compatibility only. */
                        fdisk_create_disklabel(cxt, "sgi");
                        break;
                case 'h':
@@ -927,7 +929,7 @@ static void command_prompt(struct fdisk_context *cxt)
                assert(cxt->label);
 
                putchar('\n');
-               c = tolower(read_char(cxt, _("Command (m for help): ")));
+               c = read_char(cxt, _("Command (m for help): "));
                switch (c) {
                case 'a':
                        if (fdisk_is_disklabel(cxt, DOS) &&
@@ -978,6 +980,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);