1. free those inserted NsKeyNode resource when releasing SetKeyBoardLayout event.
2. cleanup HiiDataBaseDxe to directly use gEfiHiiKeyBoardLayoutGuid which is used as the guid of event group. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9978 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -395,11 +395,9 @@ ErrorExit:
|
|||||||
gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);
|
gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);
|
||||||
}
|
}
|
||||||
if (UsbKeyboardDevice->KeyboardLayoutEvent != NULL) {
|
if (UsbKeyboardDevice->KeyboardLayoutEvent != NULL) {
|
||||||
|
ReleaseKeyboardLayoutResources (UsbKeyboardDevice);
|
||||||
gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);
|
gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);
|
||||||
}
|
}
|
||||||
if (UsbKeyboardDevice->KeyConvertionTable != NULL) {
|
|
||||||
FreePool (UsbKeyboardDevice->KeyConvertionTable);
|
|
||||||
}
|
|
||||||
FreePool (UsbKeyboardDevice);
|
FreePool (UsbKeyboardDevice);
|
||||||
UsbKeyboardDevice = NULL;
|
UsbKeyboardDevice = NULL;
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,12 @@
|
|||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:"PlatformLang"
|
gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:"PlatformLang"
|
||||||
|
##
|
||||||
|
# Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,
|
||||||
|
# which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
|
||||||
|
##
|
||||||
|
gEfiHiiKeyBoardLayoutGuid ## SOMETIME_CONSUMES ## Event
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
// Global variables
|
// Global variables
|
||||||
//
|
//
|
||||||
EFI_EVENT gHiiKeyboardLayoutChanged;
|
EFI_EVENT gHiiKeyboardLayoutChanged;
|
||||||
EFI_GUID gHiiSetKbdLayoutEventGuid = EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID;
|
|
||||||
|
|
||||||
HII_DATABASE_PRIVATE_DATA mPrivate = {
|
HII_DATABASE_PRIVATE_DATA mPrivate = {
|
||||||
HII_DATABASE_PRIVATE_DATA_SIGNATURE,
|
HII_DATABASE_PRIVATE_DATA_SIGNATURE,
|
||||||
@@ -168,7 +167,7 @@ InitializeHiiDatabase (
|
|||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
KeyboardLayoutChangeNullEvent,
|
KeyboardLayoutChangeNullEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&gHiiSetKbdLayoutEventGuid,
|
&gEfiHiiKeyBoardLayoutGuid,
|
||||||
&gHiiKeyboardLayoutChanged
|
&gHiiKeyboardLayoutChanged
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
Reference in New Issue
Block a user