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:
niruiyu 2012-07-30 03:50:42 +00:00
parent 6b8ebcb8de
commit 402e4a9d77
17 changed files with 68 additions and 82 deletions

View File

@ -549,7 +549,7 @@ KeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
EFI_STATUS Status;
@ -582,7 +582,7 @@ KeyboardRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
Status = EFI_SUCCESS;
goto Exit;
}
@ -600,11 +600,10 @@ KeyboardRegisterKeyNotify (
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
Status = EFI_SUCCESS;
Exit:
@ -631,7 +630,7 @@ EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
{
EFI_STATUS Status;
@ -658,7 +657,7 @@ KeyboardUnregisterKeyNotify (
NotifyEntry,
KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//

View File

@ -1,7 +1,7 @@
/** @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
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
@ -50,7 +50,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@ -496,7 +495,7 @@ KeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
/**
@ -515,7 +514,7 @@ EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);
/**

View File

@ -1,7 +1,7 @@
/** @file
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
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_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
EFI_STATUS Status;
@ -2277,7 +2277,7 @@ BiosKeyboardRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
Status = EFI_SUCCESS;
goto Exit;
}
@ -2296,11 +2296,10 @@ BiosKeyboardRegisterKeyNotify (
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
Status = EFI_SUCCESS;
Exit:
@ -2325,7 +2324,7 @@ EFI_STATUS
EFIAPI
BiosKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
{
EFI_STATUS Status;
@ -2350,7 +2349,7 @@ BiosKeyboardUnregisterKeyNotify (
//
// Enter critical section
//
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
for (Link = BiosKeyboardPrivate->NotifyList.ForwardLink; Link != &BiosKeyboardPrivate->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
@ -2359,7 +2358,7 @@ BiosKeyboardUnregisterKeyNotify (
NotifyEntry,
BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//

View File

@ -1,6 +1,6 @@
/** @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
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 {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@ -638,7 +637,7 @@ BiosKeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
/**
@ -655,7 +654,7 @@ EFI_STATUS
EFIAPI
BiosKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);
/**

View File

@ -31,7 +31,7 @@ typedef struct {
UINTN Signature;
LIST_ENTRY Link;
EFI_HANDLE NotifyHandle;
VOID *NotifyHandle;
UINT16 BootOptionNumber;
UINT8 CodeCount;
UINT8 WaitingKey;

View File

@ -1042,7 +1042,7 @@ USBKeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
USB_KB_DEV *UsbKeyboardDevice;
@ -1073,7 +1073,7 @@ USBKeyboardRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
return EFI_SUCCESS;
}
}
@ -1089,12 +1089,11 @@ USBKeyboardRegisterKeyNotify (
NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&UsbKeyboardDevice->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
return EFI_SUCCESS;
@ -1114,7 +1113,7 @@ EFI_STATUS
EFIAPI
USBKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
{
USB_KB_DEV *UsbKeyboardDevice;
@ -1141,7 +1140,7 @@ USBKeyboardUnregisterKeyNotify (
NotifyEntry,
USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//

View File

@ -1,7 +1,7 @@
/** @file
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
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
@ -72,7 +72,6 @@ typedef struct {
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@ -518,7 +517,7 @@ USBKeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
/**
@ -536,7 +535,7 @@ EFI_STATUS
EFIAPI
USBKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);
/**

View File

@ -3606,7 +3606,7 @@ ConSplitterTextInRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@ -3630,7 +3630,7 @@ ConSplitterTextInRegisterKeyNotify (
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
return EFI_SUCCESS;
}
}
@ -3650,7 +3650,6 @@ ConSplitterTextInRegisterKeyNotify (
}
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
//
@ -3682,7 +3681,7 @@ ConSplitterTextInRegisterKeyNotify (
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
return EFI_SUCCESS;
@ -3705,7 +3704,7 @@ EFI_STATUS
EFIAPI
ConSplitterTextInUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
{
TEXT_IN_SPLITTER_PRIVATE_DATA *Private;
@ -3721,7 +3720,7 @@ ConSplitterTextInUnregisterKeyNotify (
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS (Link);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
for (Index = 0; Index < Private->CurrentNumberOfExConsoles; Index++) {
Private->TextInExList[Index]->UnregisterKeyNotify (
Private->TextInExList[Index],

View File

@ -95,8 +95,7 @@ typedef struct {
//
typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {
UINTN Signature;
EFI_HANDLE *NotifyHandleList;
EFI_HANDLE NotifyHandle;
VOID **NotifyHandleList;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@ -1405,7 +1404,7 @@ ConSplitterTextInRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
@ -1426,7 +1425,7 @@ EFI_STATUS
EFIAPI
ConSplitterTextInUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);
/**

View File

@ -1,7 +1,7 @@
/** @file
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
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
@ -74,7 +74,6 @@ typedef struct {
typedef struct _TERMINAL_CONSOLE_IN_EX_NOTIFY {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@ -350,7 +349,7 @@ TerminalConInRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
/**
@ -370,7 +369,7 @@ EFI_STATUS
EFIAPI
TerminalConInUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);
/**

View File

@ -324,7 +324,7 @@ TerminalConInRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
TERMINAL_DEV *TerminalDevice;
@ -352,7 +352,7 @@ TerminalConInRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
return EFI_SUCCESS;
}
}
@ -368,11 +368,10 @@ TerminalConInRegisterKeyNotify (
NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&TerminalDevice->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
return EFI_SUCCESS;
}
@ -394,7 +393,7 @@ EFI_STATUS
EFIAPI
TerminalConInUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
{
TERMINAL_DEV *TerminalDevice;
@ -416,7 +415,7 @@ TerminalConInUnregisterKeyNotify (
NotifyEntry,
TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//

View File

@ -5,7 +5,7 @@
which exposes much more state and modifier information from the input device,
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
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
@ -274,7 +274,7 @@ EFI_STATUS
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
);
/**
@ -296,7 +296,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
);

View File

@ -1,6 +1,6 @@
/** @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
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
@ -76,7 +76,6 @@ typedef struct {
typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;

View File

@ -822,7 +822,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
/*++
@ -867,7 +867,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
);
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
return EFI_SUCCESS;
}
}
@ -883,11 +883,10 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
NewNotify->Signature = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
return EFI_SUCCESS;
@ -897,7 +896,7 @@ EFI_STATUS
EFIAPI
WinNtGopSimpleTextInExUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
/*++
@ -931,7 +930,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
NotifyEntry,
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//

View File

@ -1,7 +1,7 @@
/** @file
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
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
@ -107,14 +107,14 @@ typedef struct {
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.
SPLIT_LIST SplitList; ///< List of Splits in FILO stack.
EFI_HANDLE CtrlCNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlCNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlCNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlCNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlSNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlSNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlSNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
EFI_HANDLE CtrlSNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlCNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlCNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlCNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlCNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlSNotifyHandle1; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlSNotifyHandle2; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlSNotifyHandle3; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
VOID *CtrlSNotifyHandle4; ///< The NotifyHandle returned from SimpleTextInputEx.RegisterKeyNotify.
BOOLEAN HaltOutput; ///< TRUE to start a CTRL-S halt.
} SHELL_INFO;

View File

@ -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>
This program and the accompanying materials
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')
typedef struct _UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY {
UINTN Signature;
EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
EFI_EVENT Event;

View File

@ -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>
This program and the accompanying materials
@ -499,7 +499,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
OUT VOID **NotifyHandle
)
{
EFI_STATUS Status;
@ -526,7 +526,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
);
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
*NotifyHandle = CurrentNotify->NotifyHandle;
*NotifyHandle = CurrentNotify;
return EFI_SUCCESS;
}
}
@ -542,7 +542,6 @@ UnixGopSimpleTextInExRegisterKeyNotify (
NewNotify->Signature = UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
@ -556,7 +555,7 @@ UnixGopSimpleTextInExRegisterKeyNotify (
ASSERT_EFI_ERROR (Status);
*NotifyHandle = NewNotify->NotifyHandle;
*NotifyHandle = NewNotify;
return EFI_SUCCESS;
@ -582,7 +581,7 @@ EFI_STATUS
EFIAPI
UnixGopSimpleTextInExUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
IN VOID *NotificationHandle
)
/*++
@ -620,7 +619,7 @@ UnixGopSimpleTextInExUnregisterKeyNotify (
NotifyEntry,
UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
);
if (CurrentNotify->NotifyHandle == NotificationHandle) {
if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//