From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 1832321967BF3 for ; Tue, 6 Jun 2017 01:43:03 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2017 01:43:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,305,1493708400"; d="scan'208";a="95120418" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 06 Jun 2017 01:43:51 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Jun 2017 01:43:50 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Jun 2017 01:43:44 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.151]) by shsmsx102.ccr.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Tue, 6 Jun 2017 16:43:41 +0800 From: "Ni, Ruiyu" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] ShellPkg/alias: Return status for alias deletion Thread-Index: AQHS3p8EZHytuxrwH0iFv+buukdAdqIXhLJQ Date: Tue, 6 Jun 2017 08:43:41 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B988FB6@SHSMSX104.ccr.corp.intel.com> References: <20170606082904.195040-1-ruiyu.ni@intel.com> In-Reply-To: <20170606082904.195040-1-ruiyu.ni@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/alias: Return status for alias deletion 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: Tue, 06 Jun 2017 08:43:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Including Tapan. Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ru= iyu > Ni > Sent: Tuesday, June 6, 2017 4:29 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH] ShellPkg/alias: Return status for alias deletion >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > Cc: Tapan Shah > --- > ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > b/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > index 5a3b7e5913..7277bd4b90 100644 > --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Alias.c > @@ -2,7 +2,7 @@ > Main file for Alias shell level 3 function. >=20 > (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
> - Copyright (c) 2009 - 2016, 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 @@ -151,6 +151,15 @@ ShellCommandRunAlias ( > // delete an alias > // > 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"); > + ShellStatus =3D SHELL_ACCESS_DENIED; > + } else { > + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), > gShellLevel3HiiHandle, L"alias", Status); > + ShellStatus =3D SHELL_DEVICE_ERROR; > + } > + } > } else if (ShellCommandLineGetCount(Package) =3D=3D 3) { > // > // must be adding an alias > -- > 2.12.2.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel