From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 3A4B281EE0 for ; Mon, 27 Feb 2017 19:08:49 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2017 19:08:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,217,1484035200"; d="scan'208";a="829159833" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 27 Feb 2017 19:08:46 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 27 Feb 2017 19:08:46 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Tue, 28 Feb 2017 11:08:43 +0800 From: "Ni, Ruiyu" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" , "Chen, Chen A" , chen881220 Thread-Topic: [edk2] [PATCH] ShellPkg/bcfg: Add Shell Spec 2.2 modification functionality Thread-Index: AQHSkM4+sYug2WdGbEKX2SqTj5QS7KF9vg+g Date: Tue, 28 Feb 2017 03:08:42 +0000 Deferred-Delivery: Tue, 28 Feb 2017 03:08:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B8B7DE7@SHSMSX104.ccr.corp.intel.com> References: <20170227075002.322540-1-ruiyu.ni@intel.com> In-Reply-To: <20170227075002.322540-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/bcfg: Add Shell Spec 2.2 modification functionality 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: Tue, 28 Feb 2017 03:08:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ruiyu Ni > Sent: Monday, February 27, 2017 3:50 PM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Chen, Chen A > ; chen881220 > Subject: [edk2] [PATCH] ShellPkg/bcfg: Add Shell Spec 2.2 modification > functionality >=20 > From: chen881220 >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Chen A Chen > Cc: Jaben Carsey > --- > .../UefiShellBcfgCommandLib.c | 352 +++++++++++++++= +++++- > .../UefiShellBcfgCommandLib.inf | 3 +- > ShellPkg/ShellPkg.dsc | 8 + > 3 files changed, 360 insertions(+), 3 deletions(-) >=20 > diff --git > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > index 62a52ad..1538bc6 100644 > --- > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > +++ > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c > @@ -2,7 +2,7 @@ > Main file for BCFG command. >=20 > (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
> - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 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 @@ -41,6 +41,7 @@ #include #include > #include > +#include >=20 > STATIC CONST CHAR16 mFileName[] =3D L"ShellCommands"; STATIC > EFI_HANDLE gShellBcfgHiiHandle =3D NULL; @@ -59,7 +60,11 @@ typedef > enum { > BcfgTypeRm =3D 4, > BcfgTypeMv =3D 5, > BcfgTypeOpt =3D 6, > - BcfgTypeMax =3D 7 > + BcfgTypeMod =3D 7, > + BcfgTypeModf =3D 8, > + BcfgTypeModp =3D 9, > + BcfgTypeModh =3D 10, > + BcfgTypeMax =3D 11 > } BCFG_OPERATION_TYPE; >=20 > typedef struct { > @@ -275,6 +280,247 @@ GetDevicePathForDriverHandle ( } >=20 > /** > + Functino to get Device Path by a handle. > + > + @param[in] TheHandle Use it to get DevicePath. > + @param[in] Target Boot option target. > + @param[in, out] DevicePath On a sucessful return the device path to= the > handle. > + > + @retval SHELL_INVALID_PARAMETER The handle was NULL. > + @retval SHELL_NOT_FOUND Not found device path by handle. > + @retval SHELL_SUCCESS Get device path successfully. > +**/ > +SHELL_STATUS > +GetDevicePathByHandle( > + IN EFI_HANDLE TheHandle, > + IN BCFG_OPERATION_TARGET Target, > + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath > + ) > +{ > + EFI_STATUS Status; > + SHELL_STATUS ShellStatus; > + > + UINTN DriverBindingHandleCount; > + UINTN ParentControllerHandleCount; > + UINTN ChildControllerHandleCount; > + > + ShellStatus =3D SHELL_SUCCESS; > + > + if (TheHandle =3D=3D NULL) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), > gShellBcfgHiiHandle, L"bcfg", L"Handle Number"); > + return SHELL_INVALID_PARAMETER; > + } > + > + Status =3D PARSE_HANDLE_DATABASE_UEFI_DRIVERS (TheHandle, > + &DriverBindingHandleCount, NULL); if (EFI_ERROR(Status)) { > + DriverBindingHandleCount =3D 0; > + } > + > + Status =3D PARSE_HANDLE_DATABASE_PARENTS (TheHandle, > + &ParentControllerHandleCount, NULL); if (EFI_ERROR (Status)) { > + ParentControllerHandleCount =3D 0; > + } > + > + Status =3D ParseHandleDatabaseForChildControllers (TheHandle, > + &ChildControllerHandleCount, NULL); if (EFI_ERROR (Status)) { > + ChildControllerHandleCount =3D 0; > + } > + > + Status =3D gBS->HandleProtocol (TheHandle, &gEfiDevicePathProtocolGuid= , > + (VOID**)DevicePath); > + > + if ( DriverBindingHandleCount > 0 || > + ParentControllerHandleCount > 0 || > + ChildControllerHandleCount > 0 || > + !EFI_ERROR(Status) > + ) { > + // > + // The handle points to a real controller which has a device path. > + // > + if (Target =3D=3D BcfgTargetDriverOrder) { > + ShellPrintHiiEx ( > + -1, > + -1, > + NULL,STRING_TOKEN (STR_GEN_PARAM_INV), > + gShellBcfgHiiHandle, > + L"bcfg", > + L"Handle should point to driver image." > + ); > + ShellStatus =3D SHELL_NOT_FOUND; > + } > + } else { > + // > + // The handle points to a driver image. > + // > + if (Target =3D=3D BcfgTargetBootOrder) { > + ShellPrintHiiEx ( > + -1, > + -1, > + NULL, > + STRING_TOKEN (STR_GEN_PARAM_INV), > + gShellBcfgHiiHandle, > + L"bcfg", > + L"Handle should point to controller." > + ); > + ShellStatus =3D SHELL_NOT_FOUND; > + } else { > + if (EFI_ERROR (GetDevicePathForDriverHandle (TheHandle, DevicePath= ))) > { > + ShellStatus =3D SHELL_NOT_FOUND; > + } > + } > + } > + > + return (ShellStatus); > +} > + > +/** > + Function to modify an option. > + > + @param[in] BcfgOperation Pointer to BCFG operation. > + @param[in] OrderCount The number if items in CurrentOrder. > + > + @retval SHELL_SUCCESS The operation was successful. > + @retval SHELL_INVALID_PARAMETER A parameter was invalid. > + @retval SHELL_OUT_OF_RESOUCES A memory allocation failed. > +**/ > +SHELL_STATUS > +BcfgMod ( > + IN CONST BGFG_OPERATION *BcfgOperation, > + IN CONST UINTN OrderCount > + ) > +{ > + EFI_STATUS Status; > + EFI_HANDLE CurHandle; > + SHELL_STATUS ShellStatus; > + CHAR16 OptionStr[40]; > + EFI_SHELL_FILE_INFO *FileList; > + EFI_SHELL_FILE_INFO *Arg; > + EFI_DEVICE_PATH_PROTOCOL *DevicePath; > + EFI_DEVICE_PATH_PROTOCOL *DevicePathBuffer; > + EFI_DEVICE_PATH_PROTOCOL *DevicePathWalker; > + EFI_BOOT_MANAGER_LOAD_OPTION LoadOption; > + > + ShellStatus =3D SHELL_SUCCESS; > + FileList =3D NULL; > + DevicePath =3D NULL; > + > + ZeroMem (&LoadOption, sizeof(EFI_BOOT_MANAGER_LOAD_OPTION)); > + > + if ( (BcfgOperation->Type =3D=3D BcfgTypeMod && BcfgOperation- > >Description =3D=3D NULL) || > + (BcfgOperation->Type =3D=3D BcfgTypeModf && BcfgOperation->FileNa= me > =3D=3D NULL) || > + (BcfgOperation->Type =3D=3D BcfgTypeModp && BcfgOperation->FileNa= me > =3D=3D NULL) || > + (BcfgOperation->Type =3D=3D BcfgTypeModh && BcfgOperation- > >HandleIndex =3D=3D 0) || > + (BcfgOperation->Number1 > OrderCount) > + ) { > + return (SHELL_INVALID_PARAMETER); > + } > + > + if (BcfgOperation->Type =3D=3D BcfgTypeModh) { > + CurHandle =3D ConvertHandleIndexToHandle (BcfgOperation- > >HandleIndex); > + ShellStatus =3D GetDevicePathByHandle (CurHandle, BcfgOperation->Tar= get, > &DevicePathBuffer); > + if (ShellStatus =3D=3D SHELL_SUCCESS) { > + DevicePath =3D DuplicateDevicePath (DevicePathBuffer); > + } > + } else if (BcfgOperation->Type =3D=3D BcfgTypeModf || BcfgOperation->T= ype > =3D=3D BcfgTypeModp) { > + // > + // Get Device Path by FileName. > + // > + ShellOpenFileMetaArg ((CHAR16 *)BcfgOperation->FileName, > EFI_FILE_MODE_READ, &FileList); > + if (FileList =3D=3D NULL) { > + // > + // The name of file matched nothing. > + // > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_FILE_OPEN_FAIL), gShellBcfgHiiHandle, L"bcfg", BcfgOperation- > >FileName); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } > + else if (FileList->Link.ForwardLink !=3D FileList->Link.BackLink) { > + // > + // If the name of file expanded to multiple names, it's fail. > + // > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE), > gShellBcfgHiiHandle, L"bcfg", BcfgOperation->FileName); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + Arg =3D (EFI_SHELL_FILE_INFO *)GetFirstNode (&FileList->Link); > + if (EFI_ERROR (Arg->Status)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_OPEN)= , > gShellBcfgHiiHandle, L"bcfg", BcfgOperation->FileName); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + DevicePathBuffer =3D gEfiShellProtocol->GetDevicePathFromFilePat= h > (Arg->FullName); > + if (DevicePathBuffer =3D=3D NULL) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_DP)= , > gShellBcfgHiiHandle, L"bcfg", Arg->FullName); > + ShellStatus =3D SHELL_UNSUPPORTED; > + } > + } > + } > + > + if (ShellStatus =3D=3D SHELL_SUCCESS) { > + if (BcfgOperation->Type =3D=3D BcfgTypeModp) { > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + DevicePathWalker =3D DevicePathBuffer; > + while (!IsDevicePathEnd (DevicePathWalker)) { > + if ( DevicePathType (DevicePathWalker) =3D=3D MEDIA_DEVICE_PAT= H && > + DevicePathSubType (DevicePathWalker) =3D=3D MEDIA_HARDDRI= VE_DP > + ) { > + // > + // We found the portion of device path starting with the har= d driver > partition. > + // > + ShellStatus =3D SHELL_SUCCESS; > + DevicePath =3D DuplicateDevicePath (DevicePathWalker); > + break; > + } else { > + DevicePathWalker =3D NextDevicePathNode (DevicePathWalker); > + } > + } > + } else { > + DevicePath =3D DuplicateDevicePath (DevicePathBuffer); > + } > + > + FreePool (DevicePathBuffer); > + } > + } > + > + if (ShellStatus =3D=3D SHELL_SUCCESS) { > + if (BcfgOperation->Target =3D=3D BcfgTargetBootOrder) { > + UnicodeSPrint (OptionStr, sizeof (OptionStr), L"Boot%04x", > BcfgOperation->Order[BcfgOperation->Number1]); > + } else { > + UnicodeSPrint (OptionStr, sizeof (OptionStr), L"Driver%04x", > BcfgOperation->Order[BcfgOperation->Number1]); > + } > + Status =3D EfiBootManagerVariableToLoadOption (OptionStr, &LoadOptio= n); > + if (EFI_ERROR(Status)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_BCFG_NONE), > gShellBcfgHiiHandle); > + ShellStatus =3D SHELL_NOT_FOUND; > + } > + } > + > + if (ShellStatus =3D=3D SHELL_SUCCESS) { > + if (BcfgOperation->Type =3D=3D BcfgTypeMod) { > + SHELL_FREE_NON_NULL (LoadOption.Description); > + LoadOption.Description =3D AllocateCopyPool (StrSize (BcfgOperatio= n- > >Description), BcfgOperation->Description); > + } else { > + SHELL_FREE_NON_NULL (LoadOption.FilePath); > + LoadOption.FilePath =3D DuplicateDevicePath (DevicePath); > + } > + > + Status =3D EfiBootManagerLoadOptionToVariable (&LoadOption); > + if (EFI_ERROR(Status)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL= ), > gShellBcfgHiiHandle, L"bcfg", OptionStr); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } > + } > + > + EfiBootManagerFreeLoadOption (&LoadOption); > + > + if (DevicePath !=3D NULL) { > + FreePool (DevicePath); > + } > + > + if (FileList !=3D NULL) { > + ShellCloseFileMetaArg (&FileList); > + } > + > + return (ShellStatus); > +} > + > +/** > Function to add a option. >=20 > @param[in] Position The position to add Target at. > @@ -1404,6 +1650,102 @@ ShellCommandRunBcfg ( > } > } > } > + } > + else if (gUnicodeCollation->StriColl (gUnicodeCollation, > (CHAR16*)CurrentParam, L"mod") =3D=3D 0) { > + if ((ParamNumber + 2) >=3D ShellCommandLineGetCount (Package))= { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW= ), > gShellBcfgHiiHandle, L"bcfg"); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + CurrentOperation.Type =3D BcfgTypeMod; > + CurrentParam =3D ShellCommandLineGetRawValue (Package, > ++ParamNumber); > + if (CurrentParam =3D=3D NULL || !ShellIsHexOrDecimalNumber > (CurrentParam, TRUE, FALSE)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + Status =3D ShellConvertStringToUint64 (CurrentParam, &Inte= rmediate, > TRUE, FALSE); > + CurrentOperation.Number1 =3D (UINT16)Intermediate; > + if (CurrentOperation.Number1 >=3D Count) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + ASSERT (CurrentOperation.Description =3D=3D NULL); > + CurrentOperation.Description =3D StrnCatGrow > (&CurrentOperation.Description, NULL, ShellCommandLineGetRawValue > (Package, ++ParamNumber), 0); > + } > + } > + } > + } else if (gUnicodeCollation->StriColl (gUnicodeCollation, > (CHAR16*)CurrentParam, L"modf") =3D=3D 0) { > + if ((ParamNumber + 2) >=3D ShellCommandLineGetCount (Package))= { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW= ), > gShellBcfgHiiHandle, L"bcfg"); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + CurrentOperation.Type =3D BcfgTypeModf; > + CurrentParam =3D ShellCommandLineGetRawValue (Package, > ++ParamNumber); > + if (CurrentParam =3D=3D NULL || !ShellIsHexOrDecimalNumber > (CurrentParam, TRUE, FALSE)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + Status =3D ShellConvertStringToUint64 (CurrentParam, &Int= ermediate, > TRUE, FALSE); > + CurrentOperation.Number1 =3D (UINT16)Intermediate; > + if (CurrentOperation.Number1 >=3D Count) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + ASSERT (CurrentOperation.FileName =3D=3D NULL); > + CurrentOperation.FileName =3D StrnCatGrow > (&CurrentOperation.FileName, NULL, ShellCommandLineGetRawValue > (Package, ++ParamNumber), 0); > + } > + } > + } > + } else if (gUnicodeCollation->StriColl (gUnicodeCollation, > (CHAR16*)CurrentParam, L"modp") =3D=3D 0) { > + if ((ParamNumber + 2) >=3D ShellCommandLineGetCount (Package))= { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW= ), > gShellBcfgHiiHandle, L"bcfg"); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + CurrentOperation.Type =3D BcfgTypeModp; > + CurrentParam =3D ShellCommandLineGetRawValue (Package, > ++ParamNumber); > + if (CurrentParam =3D=3D NULL || !ShellIsHexOrDecimalNumber > (CurrentParam, TRUE, FALSE)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + Status =3D ShellConvertStringToUint64 (CurrentParam, &Inte= rmediate, > TRUE, FALSE); > + CurrentOperation.Number1 =3D (UINT16)Intermediate; > + if (CurrentOperation.Number1 >=3D Count) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + ASSERT (CurrentOperation.FileName =3D=3D NULL); > + CurrentOperation.FileName =3D StrnCatGrow > (&CurrentOperation.FileName, NULL, ShellCommandLineGetRawValue > (Package, ++ParamNumber), 0); > + } > + } > + } > + } else if (gUnicodeCollation->StriColl (gUnicodeCollation, > (CHAR16*)CurrentParam, L"modh") =3D=3D 0) { > + if ((ParamNumber + 2) >=3D ShellCommandLineGetCount (Package))= { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW= ), > gShellBcfgHiiHandle, L"bcfg"); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + CurrentOperation.Type =3D BcfgTypeModh; > + CurrentParam =3D ShellCommandLineGetRawValue (Package, > ++ParamNumber); > + if (CurrentParam =3D=3D NULL || !ShellIsHexOrDecimalNumber > (CurrentParam, TRUE, FALSE)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } > + else { > + Status =3D ShellConvertStringToUint64 (CurrentParam, &Inte= rmediate, > TRUE, FALSE); > + CurrentOperation.Number1 =3D (UINT16)Intermediate; > + if (CurrentOperation.Number1 >=3D Count) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + CurrentParam =3D ShellCommandLineGetRawValue (Package, > ++ParamNumber); > + if (CurrentParam =3D=3D NULL || !ShellIsHexOrDecimalNumb= er > (CurrentParam, TRUE, FALSE)) { > + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam); > + ShellStatus =3D SHELL_INVALID_PARAMETER; > + } else { > + Status =3D ShellConvertStringToUint64 (CurrentParam, > &Intermediate, TRUE, FALSE); > + CurrentOperation.HandleIndex =3D (UINT16)Intermediate; > + } > + } > + } > + } > } else { > ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV)= , > gShellBcfgHiiHandle, L"bcfg", CurrentParam); > ShellStatus =3D SHELL_INVALID_PARAMETER; @@ -1451,6 +1793,12 @= @ > ShellCommandRunBcfg ( > (BOOLEAN)(CurrentOperation.Type =3D=3D BcfgTypeAddp), > CurrentOperation.HandleIndex); > break; > + case BcfgTypeMod: > + case BcfgTypeModf: > + case BcfgTypeModp: > + case BcfgTypeModh: > + ShellStatus =3D BcfgMod (&CurrentOperation, Count); > + break; > case BcfgTypeOpt: > ShellStatus =3D BcfgAddOpt( > CurrentOperation.OptData, > diff --git > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > index 44c8b7e..88b96ea 100644 > --- > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > +++ > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.i > +++ nf > @@ -1,7 +1,7 @@ > ## @file > # Provides shell install1 functions > # > -# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. > +# Copyright (c) 2010 - 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 @@ -41,6 +41,= 7 > @@ [LibraryClasses] > UefiBootServicesTableLib > SortLib > PrintLib > + UefiBootManagerLib >=20 > [Guids] > gShellBcfgHiiGuid ## SOMETIMES_CONSUMES ## HII > diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index > 5c01933..a87428a 100644 > --- a/ShellPkg/ShellPkg.dsc > +++ b/ShellPkg/ShellPkg.dsc > @@ -55,6 +55,14 @@ [LibraryClasses.common] >=20 > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg > CommandLib.inf > IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf >=20 > + > + > UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo > tMan > + agerLib.inf HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > + > + > TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem > pl > + ate.inf > + > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc > eLi > + bNull.inf > + > DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl > + eLib.inf > + DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf > + > + > ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseR > ep > + ortStatusCodeLibNull.inf > + > [LibraryClasses.ARM] > # > # It is not possible to prevent the ARM compiler for generic intrinsic > functions. > -- > 2.9.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel