From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DF5F081CE2 for ; Mon, 31 Oct 2016 08:22:09 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 31 Oct 2016 08:22:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,575,1473145200"; d="scan'208";a="25772819" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 31 Oct 2016 08:22:10 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 31 Oct 2016 08:22:10 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.170]) by FMSMSX102.amr.corp.intel.com ([169.254.10.34]) with mapi id 14.03.0248.002; Mon, 31 Oct 2016 08:22:10 -0700 From: "Carsey, Jaben" To: Tapan Shah , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [PATCH] ShellPkg: print only valid characters for file overwrite prompt Thread-Index: AQHSMVRbEVXDRQ8YRUSYNPHbPIGmn6DCsl9w Date: Mon, 31 Oct 2016 15:22:09 +0000 Message-ID: References: <1477684139-11728-1-git-send-email-tapandshah@hpe.com> In-Reply-To: <1477684139-11728-1-git-send-email-tapandshah@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDk0NjQwOTEtZWIwMC00MmNiLTkyNTUtOTgxMTUxYzVkZGQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InlmRzJIYU44blwvS25uaHRJZ2dBeWU5R3pyNDFcL3ZjZnhmM1BOS0hoQzF5ST0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg: print only valid characters for file overwrite prompt X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2016 15:22:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey 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 ; Tapan Shah > > Subject: [PATCH] ShellPkg: print only valid characters for file overwrite > prompt > Importance: High >=20 > 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. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Tapan Shah > --- > ShellPkg/Library/UefiShellLib/UefiShellLib.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > 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 !=3D 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 <=3D 127 && Key.UnicodeChar >=3D 32) { > + ShellPrintEx (-1, -1, L"%c", Key.UnicodeChar); > + } > + > switch (Key.UnicodeChar) { > case L'Y': > case L'y': > -- > 1.9.5.msysgit.0