]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c
Add code check to avoid access violation.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabaseEntry.c
index b55898de5a23b40b7e7f6ad0ce5fb32087e80b70..ae75f8ccbf92dc6248b9190060845b03d73ae7a2 100644 (file)
@@ -1,7 +1,9 @@
 /** @file\r
+This file contains the entry code to the HII database, which is defined by\r
+UEFI 2.1 specification.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2008, 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -9,18 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-    HiiDatabaseEntry.c\r
-\r
-Abstract:\r
-\r
-    This file contains the entry code to the HII database, which is defined by\r
-    UEFI 2.1 specification.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 \r
@@ -30,9 +20,8 @@ Revision History
 // Global variables\r
 //\r
 EFI_EVENT gHiiKeyboardLayoutChanged;\r
-STATIC EFI_GUID gHiiSetKbdLayoutEventGuid = EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID;\r
 \r
-STATIC HII_DATABASE_PRIVATE_DATA mPrivate = {\r
+HII_DATABASE_PRIVATE_DATA mPrivate = {\r
   HII_DATABASE_PRIVATE_DATA_SIGNATURE,\r
   {\r
     (LIST_ENTRY *) NULL,\r
@@ -174,11 +163,11 @@ InitializeHiiDatabase (
   // Create a event with EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group type.\r
   //\r
   Status = gBS->CreateEventEx (\r
-                  EFI_EVENT_NOTIFY_SIGNAL,\r
+                  EVT_NOTIFY_SIGNAL,\r
                   TPL_NOTIFY,\r
                   KeyboardLayoutChangeNullEvent,\r
                   NULL,\r
-                  &gHiiSetKbdLayoutEventGuid,\r
+                  &gEfiHiiKeyBoardLayoutGuid,\r
                   &gHiiKeyboardLayoutChanged\r
                   );\r
   if (EFI_ERROR (Status)) {\r