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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4BD7A21967BC4 for ; Fri, 9 Jun 2017 07:13:38 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2017 07:14:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,317,1493708400"; d="scan'208";a="978813320" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 09 Jun 2017 07:14:46 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 9 Jun 2017 07:14:37 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.71]) by fmsmsx120.amr.corp.intel.com ([169.254.15.158]) with mapi id 14.03.0319.002; Fri, 9 Jun 2017 07:14:37 -0700 From: "Carsey, Jaben" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] Shell/alias: Print detailed error when deleting alias Thread-Index: AQHS4M4giNQQxXHRqEe3V4Bm8z5qr6Ick8Mw Date: Fri, 9 Jun 2017 14:14:36 +0000 Message-ID: References: <20170609031100.50156-1-ruiyu.ni@intel.com> In-Reply-To: <20170609031100.50156-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjRlNDE3MzctYWViYS00OTVhLWJmZjEtZDU1NmNlNTc1NTFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkxRaFQ1WWhlRkhCN1prcUxVUjByWnc2bk9GRlorbCtPaGJVVHI1RnRMRUE9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.106] MIME-Version: 1.0 Subject: Re: [PATCH] Shell/alias: Print detailed error when deleting alias X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2017 14:13:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ruiyu Ni > Sent: Thursday, June 08, 2017 8:11 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: [edk2] [PATCH] Shell/alias: Print detailed error when deleting a= lias > Importance: High >=20 > STR_GEN_ERR_NOT_FOUND is added and currently is only > used by alias command. This string template can be used > by other commands as well. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > Cc: Jaben Carsey > Cc: Tapan Shah > --- > ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c | 7 += ++++-- > .../UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni | 3 += +- > 2 files changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > b/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > index 7277bd4b90..daf46a9f65 100644 > --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > @@ -153,10 +153,13 @@ ShellCommandRunAlias ( > Status =3D gEfiShellProtocol->SetAlias(Param1, NULL, TRUE, FALSE); > if (EFI_ERROR(Status)) { > if (Status =3D=3D EFI_ACCESS_DENIED) { > - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), > gShellLevel3HiiHandle, L"alias"); > + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), > gShellLevel3HiiHandle, L"alias"); > ShellStatus =3D SHELL_ACCESS_DENIED; > + } else if (Status =3D=3D EFI_NOT_FOUND) { > + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN > (STR_GEN_ERR_NOT_FOUND), gShellLevel3HiiHandle, L"alias", Param1); > + ShellStatus =3D SHELL_NOT_FOUND; > } else { > - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), > gShellLevel3HiiHandle, L"alias", Status); > + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), > gShellLevel3HiiHandle, L"alias", Status); > ShellStatus =3D SHELL_DEVICE_ERROR; > } > } > diff --git > a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Commands > Lib.uni > b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Commands > Lib.uni > index b027c67335..db346b216a 100644 > --- > a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Commands > Lib.uni > +++ > b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Commands > Lib.uni > @@ -2,7 +2,7 @@ > // > // (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> // (C) Copyright 2013-2015 Hewlett-Packard Development Company, > L.P.
> -// Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. > +// Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved. > // This program and the accompanying materials > // are licensed and made available under the terms and conditions of the > BSD License > // which accompanies this distribution. The full text of the license may= be > found at > @@ -32,6 +32,7 @@ > #string STR_GEN_PROBLEM #language en-US "%H%s%N: Unknown flag > - '%H%s%N'\r\n" > #string STR_GEN_NO_VALUE #language en-US "%H%s%N: Missing > argument for flag - '%H%s%N'\r\n" > #string STR_GEN_ERR_AD #language en-US "%H%s%N: Access > denied.\r\n" > +#string STR_GEN_ERR_NOT_FOUND #language en-US "%H%s%N: > '%H%s%N' does not exist.\r\n" > #string STR_GEN_ERR_UK #language en-US "%H%s%N: Status: %r\r\= n" > #string STR_GEN_PARAM_CON #language en-US "%H%s%N: > Parameters conflict\r\n" > #string STR_GEN_PARAM_CONFLICT #language en-US "%H%s%N: Flags > conflict with - '%H%s%N' and '%H%s%N'\r\n" > -- > 2.12.2.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel