From 287ce9ed6c105ea970b62847a08e745aa2a876da Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 17 May 2013 15:26:31 +0200 Subject: [PATCH] fdisk: make internal command line case sensitive Hey, this is Linux, year 2013... Signed-off-by: Karel Zak --- fdisks/fdisk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); -- 2.47.3