summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-02-12 15:09:58 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-02-12 15:09:58 +0000
commite30acb47ce10ef7774dc4501860824381b2713fc (patch)
treeceb80242592e80dec1bc2c4c25283122e464ef9d /ArmPlatformPkg/Bds
parente645bd857df95a8e2fac220fe98772cc6d37dee4 (diff)
downloadedk2-platforms-e30acb47ce10ef7774dc4501860824381b2713fc.tar.xz
ArmPlatformPkg/BdsLib: Let the user press enter when inputting booleans
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15236 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r--ArmPlatformPkg/Bds/BdsHelper.c6
1 files 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')) {