Reviewed-by: Jaben Carsey <[email protected]>
And pushed.

> -----Original Message-----
> From: Tapan Shah [mailto:[email protected]]
> Sent: Friday, October 28, 2016 12:49 PM
> To: [email protected]
> Cc: Carsey, Jaben <[email protected]>; Tapan Shah
> <[email protected]>
> Subject: [PATCH] ShellPkg: print only valid characters for file overwrite
> prompt
> Importance: High
> 
> When copy command prompts to overwrite an existing file, pressing
> backspace continuously removes everything including the shell prompt.
> So print only valid characters for file overwrite prompt.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Tapan Shah <[email protected]>
> ---
>  ShellPkg/Library/UefiShellLib/UefiShellLib.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> index 2389207..536db3c 100644
> --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> @@ -3403,7 +3403,8 @@ ShellPromptForResponse (
>              break;
>          }
>        }
> -      break;    case ShellPromptResponseTypeYesNoAllCancel:
> +      break;
> +      case ShellPromptResponseTypeYesNoAllCancel:
>         if (Prompt != NULL) {
>          ShellPrintEx(-1, -1, L"%s", Prompt);
>        }
> @@ -3421,7 +3422,11 @@ ShellPromptForResponse (
>          if (EFI_ERROR(Status)) {
>            break;
>          }
> -        ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);
> +
> +        if (Key.UnicodeChar <= 127 && Key.UnicodeChar >= 32) {
> +          ShellPrintEx (-1, -1, L"%c", Key.UnicodeChar);
> +        }
> +
>          switch (Key.UnicodeChar) {
>            case L'Y':
>            case L'y':
> --
> 1.9.5.msysgit.0

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to