From d88f86f154ddbe39355fcf0aca03438f219b2660 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Fri, 20 May 2011 01:33:42 +0000 Subject: Refine all R9 call back function to return EFI_UNSUPPORTED for all unsupported call back type. Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11681 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/BdsDxe/BootMngr/BootManager.c | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr') diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index bf65ea092b..eddb189900 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -99,47 +99,47 @@ BootManagerCallback ( LIST_ENTRY *Link; UINT16 KeyCount; - if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { + if (Action == EFI_BROWSER_ACTION_CHANGING) { + if ((Value == NULL) || (ActionRequest == NULL)) { + return EFI_INVALID_PARAMETER; + } + // - // Do nothing for UEFI OPEN/CLOSE Action + // Initialize the key count // - return EFI_SUCCESS; - } - - if ((Value == NULL) || (ActionRequest == NULL)) { - return EFI_INVALID_PARAMETER; - } + KeyCount = 0; - // - // Initialize the key count - // - KeyCount = 0; - - for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) { - Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE); + for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) { + Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE); - KeyCount++; + KeyCount++; - gOption = Option; - - // - // Is this device the one chosen? - // - if (KeyCount == QuestionId) { - // - // Assigning the returned Key to a global allows the original routine to know what was chosen - // - mKeyInput = QuestionId; + gOption = Option; // - // Request to exit SendForm(), so that we could boot the selected option + // Is this device the one chosen? // - *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; - break; + if (KeyCount == QuestionId) { + // + // Assigning the returned Key to a global allows the original routine to know what was chosen + // + mKeyInput = QuestionId; + + // + // Request to exit SendForm(), so that we could boot the selected option + // + *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; + break; + } } + + return EFI_SUCCESS; } - return EFI_SUCCESS; + // + // All other action return unsupported. + // + return EFI_UNSUPPORTED; } /** -- cgit v1.2.3