summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-02 08:48:03 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-02 08:48:03 +0000
commitf6f910dd125144707e3516bbb517b8ec7a388c06 (patch)
tree8bd9280b012a7ca5366fdee7c9579723d9485b60 /MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
parent186ca8b0cd473901fd0a6ce39d7f091383672799 (diff)
downloadedk2-platforms-f6f910dd125144707e3516bbb517b8ec7a388c06.tar.xz
Retire Extended HII library class.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8011 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c61
1 files changed, 40 insertions, 21 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
index feb1118edd..2bb0ba3df1 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
@@ -24,6 +24,31 @@ LIST_ENTRY mIScsiConfigFormList = {
&mIScsiConfigFormList
};
+HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
+ {
+ {
+ HARDWARE_DEVICE_PATH,
+ HW_VENDOR_DP,
+ {
+ (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
+ (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
+ }
+ },
+ //
+ // {49D7B73E-143D-4716-977B-C45F1CB038CC}
+ //
+ { 0x49d7b73e, 0x143d, 0x4716, { 0x97, 0x7b, 0xc4, 0x5f, 0x1c, 0xb0, 0x38, 0xcc } }
+ },
+ {
+ END_DEVICE_PATH_TYPE,
+ END_ENTIRE_DEVICE_PATH_SUBTYPE,
+ {
+ (UINT8) (END_DEVICE_PATH_LENGTH),
+ (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
+ }
+ }
+};
+
/**
Convert the IPv4 address into a dotted string.
@@ -908,7 +933,7 @@ IScsiConfigFormInit (
return Status;
}
- CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocatePool (sizeof (ISCSI_FORM_CALLBACK_INFO));
+ CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocateZeroPool (sizeof (ISCSI_FORM_CALLBACK_INFO));
if (CallbackInfo == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -928,22 +953,15 @@ IScsiConfigFormInit (
}
//
- // Create driver handle used by HII database
+ // Install Device Path Protocol and Config Access protocol to driver handle
//
- Status = HiiLibCreateHiiDriverHandle (&CallbackInfo->DriverHandle);
- if (EFI_ERROR (Status)) {
- FreePool(CallbackInfo);
- return Status;
- }
-
- //
- // Install Config Access protocol to driver handle
- //
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&CallbackInfo->DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mIScsiHiiVendorDevicePath,
&gEfiHiiConfigAccessProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &CallbackInfo->ConfigAccess
+ &CallbackInfo->ConfigAccess,
+ NULL
);
ASSERT_EFI_ERROR (Status);
@@ -1010,13 +1028,14 @@ IScsiConfigFormUnload (
//
// Uninstall EFI_HII_CONFIG_ACCESS_PROTOCOL
//
- gBS->UninstallProtocolInterface (
- mCallbackInfo->DriverHandle,
- &gEfiHiiConfigAccessProtocolGuid,
- &mCallbackInfo->ConfigAccess
- );
- HiiLibDestroyHiiDriverHandle (mCallbackInfo->DriverHandle);
-
+ gBS->UninstallMultipleProtocolInterfaces (
+ mCallbackInfo->DriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ &mIScsiHiiVendorDevicePath,
+ &gEfiHiiConfigAccessProtocolGuid,
+ &mCallbackInfo->ConfigAccess,
+ NULL
+ );
gBS->FreePool (mCallbackInfo);
return EFI_SUCCESS;