diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-14 10:47:19 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-14 10:47:19 +0000 |
commit | cb7d01c0c9fd199742d0fed6aa69dab0c79c3338 (patch) | |
tree | 920a78778c9de452a58ee0d0df2893e7c4822bdb /MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c | |
parent | 169a34619b6d583d9f2934a6a3e9caf6e5c6e355 (diff) | |
download | edk2-cb7d01c0c9fd199742d0fed6aa69dab0c79c3338.zip edk2-cb7d01c0c9fd199742d0fed6aa69dab0c79c3338.tar.gz edk2-cb7d01c0c9fd199742d0fed6aa69dab0c79c3338.tar.bz2 |
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/IScsiConfig.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index 76068e5..0025f24 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;
|