From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: Tapan Shah <tapandshah@hpe.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [PATCH] ShellPkg: print only valid characters for file overwrite prompt
Date: Mon, 31 Oct 2016 15:22:09 +0000 [thread overview]
Message-ID: <CB6E33457884FA40993F35157061515C54AB5952@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <1477684139-11728-1-git-send-email-tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
And pushed.
> -----Original Message-----
> From: Tapan Shah [mailto:tapandshah@hpe.com]
> Sent: Friday, October 28, 2016 12:49 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Tapan Shah
> <tapandshah@hpe.com>
> 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 <tapandshah@hpe.com>
> ---
> 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
prev parent reply other threads:[~2016-10-31 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 19:48 [PATCH] ShellPkg: print only valid characters for file overwrite prompt Tapan Shah
2016-10-31 15:22 ` Carsey, Jaben [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CB6E33457884FA40993F35157061515C54AB5952@FMSMSX103.amr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox