]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
1) Fix GCC version EBC interpreter bug.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / Database.c
index 534c5647a42f1e7de754ea84a9f2e0a16e254a86..0e16f9850e90d3b6b71c1e64dbe347a6238525f8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation for EFI_HII_DATABASE_PROTOCOL.\r
 \r
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,12 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "HiiDatabase.h"\r
 \r
-//\r
-// Global variables\r
-//\r
-EFI_GUID mHiiDatabaseNotifyGuid = HII_DATABASE_NOTIFY_GUID;\r
-\r
-\r
 /**\r
   This function generates a HII_DATABASE_RECORD node and adds into hii database.\r
   This is a internal function.\r
@@ -856,7 +850,7 @@ InsertStringPackage (
   //\r
   // Collect all font block info\r
   //\r
-  Status = FindStringBlock (Private, StringPackage, (EFI_STRING_ID) (-1), NULL, NULL, NULL, &StringPackage->MaxStringId);\r
+  Status = FindStringBlock (Private, StringPackage, (EFI_STRING_ID) (-1), NULL, NULL, NULL, &StringPackage->MaxStringId, NULL);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
@@ -3287,13 +3281,13 @@ HiiExportPackageLists (
   HII_DATABASE_RECORD                 *Node;\r
   UINTN                               UsedSize;\r
 \r
-  if (This == NULL || BufferSize == NULL || Handle == NULL) {\r
+  if (This == NULL || BufferSize == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   if (*BufferSize > 0 && Buffer == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  if (!IsHiiHandleValid (Handle)) {\r
+  if ((Handle != NULL) && (!IsHiiHandleValid (Handle))) {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -3419,7 +3413,7 @@ HiiRegisterPackageNotify (
   //\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &Notify->NotifyHandle,\r
-                  &mHiiDatabaseNotifyGuid,\r
+                  &gEfiCallerIdGuid,\r
                   NULL,\r
                   NULL\r
                   );\r
@@ -3477,7 +3471,7 @@ HiiUnregisterPackageNotify (
 \r
   Status = gBS->OpenProtocol (\r
                   NotificationHandle,\r
-                  &mHiiDatabaseNotifyGuid,\r
+                  &gEfiCallerIdGuid,\r
                   NULL,\r
                   NULL,\r
                   NULL,\r
@@ -3498,7 +3492,7 @@ HiiUnregisterPackageNotify (
       RemoveEntryList (&Notify->DatabaseNotifyEntry);\r
       Status = gBS->UninstallMultipleProtocolInterfaces (\r
                       Notify->NotifyHandle,\r
-                      &mHiiDatabaseNotifyGuid,\r
+                      &gEfiCallerIdGuid,\r
                       NULL,\r
                       NULL\r
                       );\r