diff options
author | Pedroa Liu <pedroa.liu@insyde.com> | 2016-05-16 20:48:41 +0800 |
---|---|---|
committer | Qiu Shumin <shumin.qiu@intel.com> | 2016-05-18 09:41:29 +0800 |
commit | b8f3601daae5c8b50ca6f7da74bb150f2eef9453 (patch) | |
tree | 047ef79c2bd699bb4ea30b9e7b7dda298bf9eaed /ShellPkg/Application | |
parent | c28d2e1047816164ffec552e4a3375122cbcc6b6 (diff) | |
download | edk2-b8f3601daae5c8b50ca6f7da74bb150f2eef9453.zip edk2-b8f3601daae5c8b50ca6f7da74bb150f2eef9453.tar.gz edk2-b8f3601daae5c8b50ca6f7da74bb150f2eef9453.tar.bz2 |
ShellPkg: Fix the incorrect behavior when pressing 'shift' key.
If 'ReadKeyStroke' function return EFI_NOT_READY then skip it.
If the return value is EFI_DEVICE_ERROR clean the currentString buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Pedroa Liu <pedroa.liu@insyde.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r-- | ShellPkg/Application/Shell/FileHandleWrappers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c index 0e5efe3..f64915d 100644 --- a/ShellPkg/Application/Shell/FileHandleWrappers.c +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c @@ -422,6 +422,12 @@ FileInterfaceStdInRead( gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
if (EFI_ERROR (Status)) {
+
+ if (Status == EFI_NOT_READY)
+ continue;
+
+ ZeroMem (CurrentString, MaxStr * sizeof(CHAR16));
+ StringLen = 0;
break;
}
|