From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) (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 CA78921967BC4 for ; Fri, 9 Jun 2017 09:25:22 -0700 (PDT) Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 6D72C8D for ; Fri, 9 Jun 2017 16:26:32 +0000 (UTC) Received: from G4W8056.americas.hpqcorp.net (2002:10d2:12f6::10d2:12f6) by G1W8106.americas.hpqcorp.net (2002:10c1:483d::10c1:483d) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 9 Jun 2017 16:25:51 +0000 Received: from G4W10204.americas.hpqcorp.net (16.207.82.16) by G4W8056.americas.hpqcorp.net (16.210.18.246) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 9 Jun 2017 16:25:50 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (15.241.52.10) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1178.4 via Frontend Transport; Fri, 9 Jun 2017 16:25:50 +0000 Received: from CS1PR84MB0024.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.142) by CS1PR84MB0024.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Fri, 9 Jun 2017 16:25:48 +0000 Received: from CS1PR84MB0024.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.142]) by CS1PR84MB0024.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.142]) with mapi id 15.01.1157.014; Fri, 9 Jun 2017 16:25:48 +0000 From: "Shah, Tapan" To: Ruiyu Ni , "edk2-devel@lists.01.org" CC: Jaben Carsey Thread-Topic: [PATCH] Shell/alias: Print detailed error when deleting alias Thread-Index: AQHS4M4VIDXBiixXaEWbWK4Fyq7RyqIcuFfg Date: Fri, 9 Jun 2017 16:25:48 +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: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [76.187.64.133] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CS1PR84MB0024; 7:EfqAYhkZldqpE2C8OlufFqot6d9mDr1IJsVETQnp3VPYy2u1L9QACotmPgJyYHJWfXm65EOk/KizinC08zmFmFzECnxqgJmnDMCyTPkhlSCOQ0CB2fq/76p5mBasonRQ2Ov1SOtONGl6DA1/Ip3rbnwEWI9177CmTms6ZSpylAhEXC8l1g3yuuO4bMRzILf/RW6bLiLmUNo9ZyBB4cEzqmoHkODnFdxHXwhywv1lC/k7qzjUgPtoWSZ0SEu4f3dy6uqg1mppx0lCOAiggqtOTkbX9kz3EdBYxn6e8GmGLftybtyERK5a+wmtaO+iNeOO82C85xaz90quoXYmrB7BYA== x-ms-traffictypediagnostic: CS1PR84MB0024: x-ms-office365-filtering-correlation-id: 03f9925a-2f96-4ff4-d4f1-08d4af54303a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075); SRVR:CS1PR84MB0024; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CS1PR84MB0024; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CS1PR84MB0024; x-forefront-prvs: 03333C607F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39840400002)(39850400002)(39860400002)(39410400002)(39400400002)(377454003)(13464003)(189998001)(5660300001)(66066001)(14454004)(25786009)(53546009)(53936002)(7736002)(4326008)(38730400002)(305945005)(6246003)(8676002)(8936002)(74316002)(478600001)(2501003)(81166006)(86362001)(2950100002)(7696004)(2906002)(3280700002)(3660700001)(229853002)(9686003)(6436002)(6506006)(77096006)(55016002)(76176999)(50986999)(33656002)(54356999)(2900100001)(122556002)(102836003)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0024; H:CS1PR84MB0024.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2017 16:25:48.6108 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0024 X-OriginatorOrg: hpe.com 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 16:25:23 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for fixing this Ray. Reviewed-by: Tapan Shah -----Original Message----- From: Ruiyu Ni [mailto:ruiyu.ni@intel.com]=20 Sent: Thursday, June 08, 2017 10:11 PM To: edk2-devel@lists.01.org Cc: Jaben Carsey ; Shah, Tapan Subject: [PATCH] Shell/alias: Print detailed error when deleting alias 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. 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(-) 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), gSh= ellLevel3HiiHandle, L"alias"); =20 + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),=20 + 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_FOUN= D), gShellLevel3HiiHandle, L"alias", Param1); + ShellStatus =3D SHELL_NOT_FOUND; } else { - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gSh= ellLevel3HiiHandle, L"alias", Status); =20 + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK),=20 + gShellLevel3HiiHandle, L"alias", Status); ShellStatus =3D SHELL_DEVICE_ERROR; } } diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Com= mandsLib.uni b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3C= ommandsLib.uni index b027c67335..db346b216a 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLi= b.uni +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Command +++ sLib.uni @@ -2,7 +2,7 @@ // // (C) Copyright 2016 Hewlett Packard Enterprise Development LP
// (C= ) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
-// Cop= yright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.=20 +
// This program and the accompanying materials // are licensed and made a= vailable under the terms and conditions of the BSD License // which accomp= anies this distribution. The full text of the license may be found at @@ -3= 2,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 argumen= t 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 n= ot 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 conf= lict\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