]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
HII Library Class interface refine.
[mirror_edk2.git] / Nt32Pkg / MiscSubClassPlatformDxe / MiscSubclassDriverEntryPoint.c
index 35ebfdc063c0d20975ac16dd461848502e02cdaa..8c2bcc19ea0c2436efdef66035ea38f50526b6b6 100644 (file)
@@ -168,7 +168,7 @@ Returns:
   //\r
   // Locate data hub protocol.\r
   //\r
-  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, &DataHub);\r
+  Status = gBS->LocateProtocol (&gEfiDataHubProtocolGuid, NULL, (VOID**)&DataHub);\r
 \r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "Could not locate DataHub protocol.  %r\n", Status));\r
@@ -180,11 +180,15 @@ Returns:
   //\r
   // Add our default strings to the HII database. They will be modified later.\r
   //\r
-  HiiLibAddPackages (1, &gEfiMiscSubClassGuid, NULL, &HiiHandle, MiscSubclassStrings);\r
-\r
-  if (EFI_ERROR (Status)) {\r
+  HiiHandle = HiiAddPackages (\r
+                &gEfiMiscSubClassGuid,\r
+                NULL,\r
+                MiscSubclassStrings,\r
+                NULL\r
+                );\r
+  if (HiiHandle == NULL) {\r
     DEBUG ((EFI_D_ERROR, "Could not log default strings to Hii.  %r\n", Status));\r
-    return Status;\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
   //\r
   //\r