]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
Refine all R9 call back function to return EFI_UNSUPPORTED for all unsupported call...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMngr / BootManager.c
index bf65ea092b534035a5aaec068eb04643b7f83ccb..eddb189900c76a3d01ff16f69d95e10b8da1decb 100644 (file)
@@ -99,47 +99,47 @@ BootManagerCallback (
   LIST_ENTRY              *Link;\r
   UINT16                  KeyCount;\r
 \r
-  if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {\r
+  if (Action == EFI_BROWSER_ACTION_CHANGING) {\r
+    if ((Value == NULL) || (ActionRequest == NULL)) {\r
+      return EFI_INVALID_PARAMETER;\r
+    }\r
+\r
     //\r
-    // Do nothing for UEFI OPEN/CLOSE Action\r
+    // Initialize the key count\r
     //\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  if ((Value == NULL) || (ActionRequest == NULL)) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
+    KeyCount = 0;\r
 \r
-  //\r
-  // Initialize the key count\r
-  //\r
-  KeyCount = 0;\r
-\r
-  for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) {\r
-    Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);\r
+    for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) {\r
+      Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);\r
 \r
-    KeyCount++;\r
+      KeyCount++;\r
 \r
-    gOption = Option;\r
-\r
-    //\r
-    // Is this device the one chosen?\r
-    //\r
-    if (KeyCount == QuestionId) {\r
-      //\r
-      // Assigning the returned Key to a global allows the original routine to know what was chosen\r
-      //\r
-      mKeyInput = QuestionId;\r
+      gOption = Option;\r
 \r
       //\r
-      // Request to exit SendForm(), so that we could boot the selected option\r
+      // Is this device the one chosen?\r
       //\r
-      *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
-      break;\r
+      if (KeyCount == QuestionId) {\r
+        //\r
+        // Assigning the returned Key to a global allows the original routine to know what was chosen\r
+        //\r
+        mKeyInput = QuestionId;\r
+\r
+        //\r
+        // Request to exit SendForm(), so that we could boot the selected option\r
+        //\r
+        *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
+        break;\r
+      }\r
     }\r
+\r
+    return EFI_SUCCESS;\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  //\r
+  // All other action return unsupported.\r
+  //\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r
 /**\r