From e30acb47ce10ef7774dc4501860824381b2713fc Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Wed, 12 Feb 2014 15:09:58 +0000 Subject: [PATCH] ArmPlatformPkg/BdsLib: Let the user press enter when inputting booleans Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15236 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BdsHelper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index 5e1b9935cb..3142d85c10 100644 --- a/ArmPlatformPkg/Bds/BdsHelper.c +++ b/ArmPlatformPkg/Bds/BdsHelper.c @@ -52,7 +52,7 @@ EditHIInputStr ( if ((Char == CHAR_LINEFEED) || (Char == CHAR_CARRIAGE_RETURN) || (Char == 0x7f)) { CmdLine[CmdLineIndex] = '\0'; - Print (L"\n\r"); + Print (L"\r\n"); return EFI_SUCCESS; } else if ((Key.UnicodeChar == L'\b') || (Key.ScanCode == SCAN_LEFT) || (Key.ScanCode == SCAN_DELETE)){ @@ -187,7 +187,9 @@ GetHIInputBoolean ( while(1) { Print (L"[y/n] "); - Status = GetHIInputStr (CmdBoolean, 2); + // Set MaxCmdLine to 3 to give space for carriage return (when the user + // hits enter) and terminal '\0'. + Status = GetHIInputStr (CmdBoolean, 3); if (EFI_ERROR(Status)) { return Status; } else if ((CmdBoolean[0] == L'y') || (CmdBoolean[0] == L'Y')) { -- 2.39.2