]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
MdeModulePkg SmiHandlerProfile: Fix memory leak in DumpSmiChildContext
[mirror_edk2.git] / MdeModulePkg / Application / BootManagerMenuApp / BootManagerMenu.c
index be1341061e60ca8604c338ad1ab6dd80428d889c..a25f2ca298c758ee6e7e145b79ebe2cd25ed17b3 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The application to show the Boot Manager Menu.\r
 \r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -57,7 +57,7 @@ PrintStringAt (
 }\r
 \r
 /**\r
-  Prints a chracter to the default console, at\r
+  Prints a character to the default console, at\r
   the supplied cursor position, using L"%c" format.\r
 \r
   @param  Column     The cursor position to print the string at.\r
@@ -79,7 +79,7 @@ PrintCharAt (
 }\r
 \r
 /**\r
-  Count the storage space of a Unicode string which uses current lanaguag to get \r
+  Count the storage space of a Unicode string which uses current language to get\r
   from input string ID.\r
 \r
   @param StringId          The input string to be counted.\r
@@ -147,7 +147,7 @@ GetLineWidth (
 /**\r
   This function uses calculate the boot menu location, size and scroll bar information.\r
 \r
-  @param  BootMenuData            The boot menu data to be proccessed.\r
+  @param  BootMenuData            The boot menu data to be processed.\r
 \r
   @return EFI_SUCCESS             calculate boot menu information successful.\r
   @retval EFI_INVALID_PARAMETER   Input parameter is invalid   \r
@@ -219,7 +219,7 @@ InitializeBootMenuScreen (
   return EFI_SUCCESS;\r
 }\r
 /**\r
-  This funciton uses check boot option is wheher setup application or no\r
+  This function uses check boot option is wheher setup application or no\r
 \r
   @param   BootOption   Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array.\r
   \r
@@ -248,7 +248,7 @@ IsBootManagerMenu (
 \r
   @param BootOption  Pointer to EFI_BOOT_MANAGER_LOAD_OPTION to check.\r
 \r
-  @retval TRUE  Ignore the boot optin.\r
+  @retval TRUE  Ignore the boot option.\r
   @retval FALSE Do not ignore the boot option.\r
 **/\r
 BOOLEAN\r
@@ -286,7 +286,7 @@ IgnoreBootOption (
 }\r
 \r
 /**\r
-  This funciton uses to initialize boot menu data\r
+  This function uses to initialize boot menu data\r
 \r
   @param   BootOption             Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array.\r
   @param   BootOptionCount        Number of boot option.\r
@@ -345,7 +345,7 @@ InitializeBootMenuData (
   and set current selected item in BootMenuData\r
 \r
   @param  WantSelectItem          The user wants to select item.\r
-  @param  BootMenuData            The boot menu data to be proccessed\r
+  @param  BootMenuData            The boot menu data to be processed\r
 \r
   @return EFI_SUCCESS             Highlight selected item and update current selected \r
                                   item successful \r
@@ -374,6 +374,7 @@ BootMenuSelectItem (
   if (BootMenuData == NULL || WantSelectItem >= BootMenuData->ItemCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
+  ASSERT (BootMenuData->ItemCount != 0);\r
   SavedAttribute = gST->ConOut->Mode->Attribute;\r
   RePaintItems = FALSE;\r
   StartCol = BootMenuData->MenuScreen.StartCol;\r
@@ -485,7 +486,7 @@ BootMenuSelectItem (
 }\r
 \r
 /**\r
-  This funciton uses to draw boot popup menu\r
+  This function uses to draw boot popup menu\r
 \r
   @param   BootMenuData           The Input BootMenuData to be processed.\r
   \r
@@ -644,7 +645,7 @@ DrawBootPopupMenu (
 }\r
 \r
 /**\r
-  This funciton uses to boot from selected item \r
+  This function uses to boot from selected item \r
 \r
   @param   BootOptions            Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array.\r
   @param   BootOptionCount        Number of boot option.\r
@@ -738,7 +739,7 @@ BdsSetConsoleMode (
 \r
   if (IsSetupMode) {\r
     //\r
-    // The requried resolution and text mode is setup mode.\r
+    // The required resolution and text mode is setup mode.\r
     //\r
     NewHorizontalResolution = mSetupHorizontalResolution;\r
     NewVerticalResolution   = mSetupVerticalResolution;\r
@@ -794,7 +795,7 @@ BdsSetConsoleMode (
             return EFI_SUCCESS;\r
           } else {\r
             //\r
-            // If current text mode is different from requried text mode.  Set new video mode\r
+            // If current text mode is different from required text mode.  Set new video mode\r
             //\r
             for (Index = 0; Index < MaxTextMode; Index++) {\r
               Status = SimpleTextOut->QueryMode (SimpleTextOut, Index, &CurrentColumn, &CurrentRow);\r
@@ -819,7 +820,7 @@ BdsSetConsoleMode (
             }\r
             if (Index == MaxTextMode) {\r
               //\r
-              // If requried text mode is not supported, return error.\r
+              // If required text mode is not supported, return error.\r
               //\r
               FreePool (Info);\r
               return EFI_UNSUPPORTED;\r