Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol.
Clean up the code to remove unnecessary NotifyHandle in the private data structure. Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Elvin Li<elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13565 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -549,7 +549,7 @@ KeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -582,7 +582,7 @@ KeyboardRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
@ -600,11 +600,10 @@ KeyboardRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||||
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
@ -631,7 +630,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
KeyboardUnregisterKeyNotify (
|
KeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -658,7 +657,7 @@ KeyboardUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
PS/2 keyboard driver header file
|
PS/2 keyboard driver header file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -50,7 +50,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;
|
|||||||
|
|
||||||
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
@ -496,7 +495,7 @@ KeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -515,7 +514,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
KeyboardUnregisterKeyNotify (
|
KeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
ConsoleOut Routines that speak VGA.
|
ConsoleOut Routines that speak VGA.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -2244,7 +2244,7 @@ BiosKeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -2277,7 +2277,7 @@ BiosKeyboardRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
@ -2296,11 +2296,10 @@ BiosKeyboardRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||||
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
@ -2325,7 +2324,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
BiosKeyboardUnregisterKeyNotify (
|
BiosKeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -2359,7 +2358,7 @@ BiosKeyboardUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions
|
are licensed and made available under the terms and conditions
|
||||||
@ -195,7 +195,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gBiosKeyboardComponentName2;
|
|||||||
|
|
||||||
typedef struct _BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
typedef struct _BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
@ -638,7 +637,7 @@ BiosKeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -655,7 +654,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
BiosKeyboardUnregisterKeyNotify (
|
BiosKeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,7 @@ typedef struct {
|
|||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
LIST_ENTRY Link;
|
LIST_ENTRY Link;
|
||||||
|
|
||||||
EFI_HANDLE NotifyHandle;
|
VOID *NotifyHandle;
|
||||||
UINT16 BootOptionNumber;
|
UINT16 BootOptionNumber;
|
||||||
UINT8 CodeCount;
|
UINT8 CodeCount;
|
||||||
UINT8 WaitingKey;
|
UINT8 WaitingKey;
|
||||||
|
@ -1042,7 +1042,7 @@ USBKeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
@ -1073,7 +1073,7 @@ USBKeyboardRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1089,12 +1089,11 @@ USBKeyboardRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||||
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
@ -1114,7 +1113,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
USBKeyboardUnregisterKeyNotify (
|
USBKeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
USB_KB_DEV *UsbKeyboardDevice;
|
USB_KB_DEV *UsbKeyboardDevice;
|
||||||
@ -1141,7 +1140,7 @@ USBKeyboardUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Header file for USB Keyboard Driver's Data Structures.
|
Header file for USB Keyboard Driver's Data Structures.
|
||||||
|
|
||||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -72,7 +72,6 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
@ -518,7 +517,7 @@ USBKeyboardRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -536,7 +535,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
USBKeyboardUnregisterKeyNotify (
|
USBKeyboardUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3606,7 +3606,7 @@ ConSplitterTextInRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
||||||
@ -3630,7 +3630,7 @@ ConSplitterTextInRegisterKeyNotify (
|
|||||||
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
|
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
|
||||||
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3650,7 +3650,6 @@ ConSplitterTextInRegisterKeyNotify (
|
|||||||
}
|
}
|
||||||
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
|
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -3682,7 +3681,7 @@ ConSplitterTextInRegisterKeyNotify (
|
|||||||
|
|
||||||
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
@ -3705,7 +3704,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInUnregisterKeyNotify (
|
ConSplitterTextInUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
|
||||||
@ -3721,7 +3720,7 @@ ConSplitterTextInUnregisterKeyNotify (
|
|||||||
|
|
||||||
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
|
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
|
||||||
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
|
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) {
|
for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) {
|
||||||
Private->TextInExList[Index]->UnregisterKeyNotify (
|
Private->TextInExList[Index]->UnregisterKeyNotify (
|
||||||
Private->TextInExList[Index],
|
Private->TextInExList[Index],
|
||||||
|
@ -95,8 +95,7 @@ typedef struct {
|
|||||||
//
|
//
|
||||||
typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {
|
typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE *NotifyHandleList;
|
VOID **NotifyHandleList;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
@ -1405,7 +1404,7 @@ ConSplitterTextInRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1426,7 +1425,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterTextInUnregisterKeyNotify (
|
ConSplitterTextInUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Header file for Terminal driver.
|
Header file for Terminal driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -74,7 +74,6 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct _TERMINAL_CONSOLE_IN_EX_NOTIFY {
|
typedef struct _TERMINAL_CONSOLE_IN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
@ -350,7 +349,7 @@ TerminalConInRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -370,7 +369,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalConInUnregisterKeyNotify (
|
TerminalConInUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -324,7 +324,7 @@ TerminalConInRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TERMINAL_DEV *TerminalDevice;
|
TERMINAL_DEV *TerminalDevice;
|
||||||
@ -352,7 +352,7 @@ TerminalConInRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -368,11 +368,10 @@ TerminalConInRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
||||||
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -394,7 +393,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalConInUnregisterKeyNotify (
|
TerminalConInUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
TERMINAL_DEV *TerminalDevice;
|
TERMINAL_DEV *TerminalDevice;
|
||||||
@ -416,7 +415,7 @@ TerminalConInUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
which exposes much more state and modifier information from the input device,
|
which exposes much more state and modifier information from the input device,
|
||||||
also allows one to register a notification for a particular keystroke.
|
also allows one to register a notification for a particular keystroke.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -274,7 +274,7 @@ EFI_STATUS
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -296,7 +296,7 @@ typedef
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
|
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -76,7 +76,6 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
|
typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
LIST_ENTRY NotifyEntry;
|
LIST_ENTRY NotifyEntry;
|
||||||
|
@ -822,7 +822,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
@ -867,7 +867,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -883,11 +883,10 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||||
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
@ -897,7 +896,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
WinNtGopSimpleTextInExUnregisterKeyNotify (
|
WinNtGopSimpleTextInExUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
@ -931,7 +930,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
|
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
function definitions for internal to shell functions.
|
function definitions for internal to shell functions.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -107,14 +107,14 @@ typedef struct {
|
|||||||
EFI_SHELL_PARAMETERS_PROTOCOL *OldShellParameters; ///< old shell parameters to reinstall upon exiting.
|
EFI_SHELL_PARAMETERS_PROTOCOL *OldShellParameters; ///< old shell parameters to reinstall upon exiting.
|
||||||
SHELL_PROTOCOL_HANDLE_LIST OldShellList; ///< List of other instances to reinstall when closing.
|
SHELL_PROTOCOL_HANDLE_LIST OldShellList; ///< List of other instances to reinstall when closing.
|
||||||
SPLIT_LIST SplitList; ///< List of Splits in FILO stack.
|
SPLIT_LIST SplitList; ///< List of Splits in FILO stack.
|
||||||
EFI_HANDLE CtrlCNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlCNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlCNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlCNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlCNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlCNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlCNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlCNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlSNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlSNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlSNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlSNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlSNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlSNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
EFI_HANDLE CtrlSNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
VOID *CtrlSNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
|
||||||
BOOLEAN HaltOutput; ///< TRUE to start a CTRL-S halt.
|
BOOLEAN HaltOutput; ///< TRUE to start a CTRL-S halt.
|
||||||
} SHELL_INFO;
|
} SHELL_INFO;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR>
|
Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -55,7 +55,6 @@ typedef struct {
|
|||||||
#define UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('U', 'g', 'S', 'n')
|
#define UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('U', 'g', 'S', 'n')
|
||||||
typedef struct _UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
|
typedef struct _UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
|
||||||
UINTN Signature;
|
UINTN Signature;
|
||||||
EFI_HANDLE NotifyHandle;
|
|
||||||
EFI_KEY_DATA KeyData;
|
EFI_KEY_DATA KeyData;
|
||||||
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
|
||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR>
|
Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR>
|
||||||
Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>
|
Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -499,7 +499,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
|
|||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_KEY_DATA *KeyData,
|
IN EFI_KEY_DATA *KeyData,
|
||||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||||
OUT EFI_HANDLE *NotifyHandle
|
OUT VOID **NotifyHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@ -526,7 +526,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
|
|||||||
);
|
);
|
||||||
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
*NotifyHandle = CurrentNotify;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -542,7 +542,6 @@ UnixGopSimpleTextInExRegisterKeyNotify (
|
|||||||
|
|
||||||
NewNotify->Signature = UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
NewNotify->Signature = UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
||||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
|
||||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
|
||||||
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
||||||
|
|
||||||
@ -556,7 +555,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
|
|||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
||||||
*NotifyHandle = NewNotify->NotifyHandle;
|
*NotifyHandle = NewNotify;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
@ -582,7 +581,7 @@ EFI_STATUS
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
UnixGopSimpleTextInExUnregisterKeyNotify (
|
UnixGopSimpleTextInExUnregisterKeyNotify (
|
||||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||||
IN EFI_HANDLE NotificationHandle
|
IN VOID *NotificationHandle
|
||||||
)
|
)
|
||||||
/*++
|
/*++
|
||||||
|
|
||||||
@ -620,7 +619,7 @@ UnixGopSimpleTextInExUnregisterKeyNotify (
|
|||||||
NotifyEntry,
|
NotifyEntry,
|
||||||
UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
|
UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
|
||||||
);
|
);
|
||||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
if (CurrentNotify == NotificationHandle) {
|
||||||
//
|
//
|
||||||
// Remove the notification function from NotifyList and free resources
|
// Remove the notification function from NotifyList and free resources
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user