summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-14 10:47:19 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-14 10:47:19 +0000
commitcb7d01c0c9fd199742d0fed6aa69dab0c79c3338 (patch)
tree920a78778c9de452a58ee0d0df2893e7c4822bdb /MdeModulePkg/Universal/Network/IScsiDxe
parent169a34619b6d583d9f2934a6a3e9caf6e5c6e355 (diff)
downloadedk2-platforms-cb7d01c0c9fd199742d0fed6aa69dab0c79c3338.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c28
1 files changed, 12 insertions, 16 deletions
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;