From: Karel Zak Date: Fri, 17 May 2013 13:26:31 +0000 (+0200) Subject: fdisk: make internal command line case sensitive X-Git-Tag: v2.24-rc1~242 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=287ce9ed6c105ea970b62847a08e745aa2a876da;p=thirdparty%2Futil-linux.git fdisk: make internal command line case sensitive Hey, this is Linux, year 2013... Signed-off-by: Karel Zak --- diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 0034b5240b..8734d5c9cc 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -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);