From cb7d01c0c9fd199742d0fed6aa69dab0c79c3338 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Tue, 14 Apr 2009 10:47:19 +0000 Subject: HII Library Class interface refine. The "HiiLib" prefix for all HII Library API function names changed to "Hii". Remove: HiiLibPreparePackageList(), replaced by HiiAddPackages() HiiLibNewString(), replaced by HiiSetString() HiiLibGetStringFromHandle(), replaced by HiiGetString() HiiLibGetStringFromToken(), replaced by HiiGetPackageString() HiiLibExtractGuidFromHiiHandle() HiiLibDevicePathToHiiHandle() HiiLibGetSupportedSecondaryLanguages() HiiLibGetSupportedLanguageNumber() HiiLibExportPackageLists() HiiLibListPackageLists() Interface change: HiiAddPackages() HiiSetString() HiiGetString() HiiGetHiiHandles() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8083 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Network/IScsiDxe/IScsiConfig.c | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'MdeModulePkg/Universal/Network/IScsiDxe') diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index 76068e573e..0025f24bc1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -715,7 +715,7 @@ IScsiFormCallback ( UnicodeSPrint (PortString, (UINTN) 128, L"Port %s", ConfigFormEntry->MacString); DeviceFormTitleToken = (EFI_STRING_ID) STR_ISCSI_DEVICE_FORM_TITLE; - HiiLibSetString (Private->RegisteredHandle, DeviceFormTitleToken, PortString); + HiiSetString (Private->RegisteredHandle, DeviceFormTitleToken, PortString, NULL); IScsiConvertDeviceConfigDataToIfrNvData (ConfigFormEntry, IfrNvData); @@ -840,13 +840,13 @@ IScsiConfigUpdateForm ( // Compose the Port string and create a new EFI_STRING_ID. // UnicodeSPrint (PortString, 128, L"Port %s", ConfigFormEntry->MacString); - HiiLibNewString (mCallbackInfo->RegisteredHandle, &ConfigFormEntry->PortTitleToken, PortString); + ConfigFormEntry->PortTitleToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, PortString, NULL); // // Compose the help string of this port and create a new EFI_STRING_ID. // UnicodeSPrint (PortString, 128, L"Set the iSCSI parameters on port %s", ConfigFormEntry->MacString); - HiiLibNewString (mCallbackInfo->RegisteredHandle, &ConfigFormEntry->PortTitleHelpToken, PortString); + ConfigFormEntry->PortTitleHelpToken = HiiSetString (mCallbackInfo->RegisteredHandle, 0, PortString, NULL); InsertTailList (&mIScsiConfigFormList, &ConfigFormEntry->Link); mNumberOfIScsiDevices++; @@ -931,7 +931,6 @@ IScsiConfigFormInit ( { EFI_STATUS Status; EFI_HII_DATABASE_PROTOCOL *HiiDatabase; - EFI_HII_PACKAGE_LIST_HEADER *PackageList; ISCSI_FORM_CALLBACK_INFO *CallbackInfo; Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **)&HiiDatabase); @@ -974,19 +973,16 @@ IScsiConfigFormInit ( // // Publish our HII data // - PackageList = HiiLibPreparePackageList (2, &mVendorGuid, IScsiDxeStrings, IScsiConfigDxeBin); - ASSERT (PackageList != NULL); - - Status = HiiDatabase->NewPackageList ( - HiiDatabase, - PackageList, - CallbackInfo->DriverHandle, - &CallbackInfo->RegisteredHandle - ); - FreePool (PackageList); - if (EFI_ERROR (Status)) { + CallbackInfo->RegisteredHandle = HiiAddPackages ( + &mVendorGuid, + CallbackInfo->DriverHandle, + IScsiDxeStrings, + IScsiConfigDxeBin, + NULL + ); + if (CallbackInfo->RegisteredHandle == NULL) { FreePool(CallbackInfo); - return Status; + return EFI_OUT_OF_RESOURCES; } mCallbackInfo = CallbackInfo; -- cgit v1.2.3