]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootOption.c
1. Perfect libraries MSA files
[mirror_edk2.git] / EdkNt32Pkg / Dxe / PlatformBds / Generic / BootMaint / BootOption.c
index 3fccd99e4a2c2d5e89767e0124c06c61f7728cd7..b5afc7c7fea7359ae8d2bc94e7cb4802546f3c96 100644 (file)
@@ -1,17 +1,17 @@
 /*++\r
 /*++\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
   BootOption.c\r
 \r
 Module Name:\r
 \r
   BootOption.c\r
-  \r
+\r
 Abstract:\r
 \r
   Provide boot option support for Application "BootMaint"\r
 Abstract:\r
 \r
   Provide boot option support for Application "BootMaint"\r
@@ -19,7 +19,7 @@ Abstract:
   Include file system navigation, system handle selection\r
 \r
   Boot option manipulation\r
   Include file system navigation, system handle selection\r
 \r
   Boot option manipulation\r
-  \r
+\r
 Revision History\r
 \r
 --*/\r
 Revision History\r
 \r
 --*/\r
@@ -42,7 +42,7 @@ Arguments:
                       Menu type\r
 \r
 Returns:\r
                       Menu type\r
 \r
 Returns:\r
-  NULL                Cannot allocate memory for current menu \r
+  NULL                Cannot allocate memory for current menu\r
                       entry\r
   Others              A valid pointer pointing to the allocated\r
                       memory pool for current menu entry\r
                       entry\r
   Others              A valid pointer pointing to the allocated\r
                       memory pool for current menu entry\r
@@ -195,11 +195,11 @@ BOpt_GetMenuEntry (
   )\r
 /*++\r
   Rountine Description :\r
   )\r
 /*++\r
   Rountine Description :\r
-    Use this routine to get one particular menu entry in specified \r
+    Use this routine to get one particular menu entry in specified\r
     menu\r
 \r
   Arguments :\r
     menu\r
 \r
   Arguments :\r
-    MenuOption        The menu that we will search \r
+    MenuOption        The menu that we will search\r
 \r
     MenuNumber        The menunubmer that we want\r
 \r
 \r
     MenuNumber        The menunubmer that we want\r
 \r
@@ -238,7 +238,7 @@ Routine Description
   protocol, Load File protocol.\r
 \r
   Building up the FileSystem Menu for user selection\r
   protocol, Load File protocol.\r
 \r
   Building up the FileSystem Menu for user selection\r
-  All file system will be stored in FsOptionMenu \r
+  All file system will be stored in FsOptionMenu\r
   for future use.\r
 \r
 Arguments:\r
   for future use.\r
 \r
 Arguments:\r
@@ -303,7 +303,7 @@ Returns:
         //\r
         // If block IO exists check to see if it's remobable media\r
         //\r
         //\r
         // If block IO exists check to see if it's remobable media\r
         //\r
-        RemovableMedia = BlkIo->Media->RemovableMedia; \r
+        RemovableMedia = BlkIo->Media->RemovableMedia;\r
       }\r
 \r
       //\r
       }\r
 \r
       //\r
@@ -311,12 +311,12 @@ Returns:
       //\r
       MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);\r
       if (NULL == MenuEntry) {\r
       //\r
       MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);\r
       if (NULL == MenuEntry) {\r
-        SafeFreePool (SimpleFsHandle);    \r
+        SafeFreePool (SimpleFsHandle);\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
       FileContext = (BM_FILE_CONTEXT *) MenuEntry->VariableContext;\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
       FileContext = (BM_FILE_CONTEXT *) MenuEntry->VariableContext;\r
-            \r
+\r
       FileContext->Handle     = SimpleFsHandle[Index];\r
       MenuEntry->OptionNumber = Index;\r
       FileContext->FHandle    = EfiLibOpenRoot (FileContext->Handle);\r
       FileContext->Handle     = SimpleFsHandle[Index];\r
       MenuEntry->OptionNumber = Index;\r
       FileContext->FHandle    = EfiLibOpenRoot (FileContext->Handle);\r
@@ -364,7 +364,7 @@ Returns:
         TempStr\r
         );\r
       OptionNumber++;\r
         TempStr\r
         );\r
       OptionNumber++;\r
-      InsertTailList (&FsOptionMenu.Head, &MenuEntry->Link);      \r
+      InsertTailList (&FsOptionMenu.Head, &MenuEntry->Link);\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
@@ -386,7 +386,7 @@ Returns:
     for (Index = 0; Index < NoLoadFileHandles; Index++) {\r
       MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);\r
       if (NULL == MenuEntry) {\r
     for (Index = 0; Index < NoLoadFileHandles; Index++) {\r
       MenuEntry = BOpt_CreateMenuEntry (BM_FILE_CONTEXT_SELECT);\r
       if (NULL == MenuEntry) {\r
-        SafeFreePool (LoadFileHandle);    \r
+        SafeFreePool (LoadFileHandle);\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
@@ -494,7 +494,7 @@ Arguments:
 \r
 Returns:\r
   VOID\r
 \r
 Returns:\r
   VOID\r
-  \r
+\r
 --*/\r
 {\r
   BM_MENU_ENTRY *MenuEntry;\r
 --*/\r
 {\r
   BM_MENU_ENTRY *MenuEntry;\r
@@ -675,15 +675,15 @@ BOpt_GetLegacyOptions (
   )\r
 /*++\r
 Routine Description:\r
   )\r
 /*++\r
 Routine Description:\r
-  \r
+\r
   Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
   Build the LegacyFDMenu LegacyHDMenu LegacyCDMenu according to LegacyBios.GetBbsInfo().\r
-    \r
+\r
 Arguments:\r
   None\r
 \r
 Returns:\r
   The device info of legacy device.\r
 Arguments:\r
   None\r
 \r
 Returns:\r
   The device info of legacy device.\r
-  \r
+\r
 --*/\r
 {\r
   BM_MENU_ENTRY             *NewMenuEntry;\r
 --*/\r
 {\r
   BM_MENU_ENTRY             *NewMenuEntry;\r
@@ -832,16 +832,16 @@ BOpt_GetBootOptions (
 /*++\r
 \r
 Routine Description:\r
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Build the BootOptionMenu according to BootOrder Variable.\r
   Build the BootOptionMenu according to BootOrder Variable.\r
-  This Routine will access the Boot#### to get EFI_LOAD_OPTION \r
-  \r
+  This Routine will access the Boot#### to get EFI_LOAD_OPTION\r
+\r
 Arguments:\r
   None\r
 \r
 Returns:\r
   The number of the Var Boot####\r
 Arguments:\r
   None\r
 \r
 Returns:\r
   The number of the Var Boot####\r
-  \r
+\r
 --*/\r
 {\r
   UINTN                     Index;\r
 --*/\r
 {\r
   UINTN                     Index;\r
@@ -1148,7 +1148,7 @@ BOpt_IsEfiImageName (
 /*++\r
 \r
 Routine Description\r
 /*++\r
 \r
 Routine Description\r
-  Check whether current FileName point to a valid \r
+  Check whether current FileName point to a valid\r
   Efi Image File.\r
 \r
 Arguments:\r
   Efi Image File.\r
 \r
 Arguments:\r
@@ -1157,7 +1157,7 @@ Arguments:
 Returns:\r
   TRUE  -   Is Efi Image\r
   FALSE -   Not a valid Efi Image\r
 Returns:\r
   TRUE  -   Is Efi Image\r
   FALSE -   Not a valid Efi Image\r
-  \r
+\r
 --*/\r
 {\r
   //\r
 --*/\r
 {\r
   //\r
@@ -1198,7 +1198,7 @@ IsEfiAppReadFromFile (
 {\r
   EFI_STATUS        Status;\r
   EFI_FILE_HANDLE   File;\r
 {\r
   EFI_STATUS        Status;\r
   EFI_FILE_HANDLE   File;\r
-    \r
+\r
   File = (EFI_FILE_HANDLE)FileHandle;\r
   Status = File->SetPosition (File, FileOffset);\r
   if (EFI_ERROR (Status)) {\r
   File = (EFI_FILE_HANDLE)FileHandle;\r
   Status = File->SetPosition (File, FileOffset);\r
   if (EFI_ERROR (Status)) {\r
@@ -1219,15 +1219,15 @@ BOpt_IsEfiApp (
 \r
 Routine Description:\r
   Check whether current FileName point to a valid Efi Application\r
 \r
 Routine Description:\r
   Check whether current FileName point to a valid Efi Application\r
-  \r
+\r
 Arguments:\r
   Dir       -   Pointer to current Directory\r
   FileName  -   Pointer to current File name.\r
 Arguments:\r
   Dir       -   Pointer to current Directory\r
   FileName  -   Pointer to current File name.\r
-  \r
+\r
 Returns:\r
   TRUE      -   Is a valid Efi Application\r
   FALSE     -   not a valid Efi Application\r
 Returns:\r
   TRUE      -   Is a valid Efi Application\r
   FALSE     -   not a valid Efi Application\r
-  \r
+\r
 --*/\r
 {\r
   EFI_STATUS                            Status;\r
 --*/\r
 {\r
   EFI_STATUS                            Status;\r
@@ -1268,7 +1268,7 @@ Routine Description
   in current system environment\r
   All valid handles in the system except those consume SimpleFs, LoadFile\r
   are stored in DriverMenu for future use.\r
   in current system environment\r
   All valid handles in the system except those consume SimpleFs, LoadFile\r
   are stored in DriverMenu for future use.\r
-  \r
+\r
 Arguments:\r
   None\r
 \r
 Arguments:\r
   None\r
 \r
@@ -1363,13 +1363,13 @@ BOpt_GetBootOptionNumber (
 /*++\r
 \r
 Routine Description:\r
 /*++\r
 \r
 Routine Description:\r
-  Get the Option Number that does not used \r
-  \r
+  Get the Option Number that does not used\r
+\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
-  \r
+\r
 --*/\r
 {\r
   BM_MENU_ENTRY *NewMenuEntry;\r
 --*/\r
 {\r
   BM_MENU_ENTRY *NewMenuEntry;\r
@@ -1415,7 +1415,7 @@ Returns:
                 &gEfiGlobalVariableGuid,\r
                 &OptionSize\r
                 );\r
                 &gEfiGlobalVariableGuid,\r
                 &OptionSize\r
                 );\r
-      if (NULL == OptionBuffer) \r
+      if (NULL == OptionBuffer)\r
         break;\r
       }\r
     }\r
         break;\r
       }\r
     }\r
@@ -1440,13 +1440,13 @@ BOpt_GetDriverOptionNumber (
 /*++\r
 \r
 Routine Description:\r
 /*++\r
 \r
 Routine Description:\r
-  Get the Option Number that does not used \r
-  \r
+  Get the Option Number that does not used\r
+\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
-  \r
+\r
 --*/\r
 {\r
   BM_MENU_ENTRY *NewMenuEntry;\r
 --*/\r
 {\r
   BM_MENU_ENTRY *NewMenuEntry;\r
@@ -1507,12 +1507,12 @@ BOpt_GetDriverOptions (
 \r
 Routine Description:\r
   Build up all DriverOptionMenu\r
 \r
 Routine Description:\r
   Build up all DriverOptionMenu\r
-  \r
+\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
 Arguments:\r
 \r
 Returns:\r
   The Option Number\r
-  \r
+\r
 --*/\r
 {\r
   UINTN           Index;\r
 --*/\r
 {\r
   UINTN           Index;\r
@@ -1671,7 +1671,7 @@ SafeFreePool (
 Routine Description:\r
   Wrap original FreePool gBS call\r
   in order to decrease code length\r
 Routine Description:\r
   Wrap original FreePool gBS call\r
   in order to decrease code length\r
-  \r
+\r
 Arguments:\r
 \r
 Returns:\r
 Arguments:\r
 \r
 Returns:\r
@@ -1679,7 +1679,7 @@ Returns:
 --*/\r
 {\r
   if (Buffer != NULL) {\r
 --*/\r
 {\r
   if (Buffer != NULL) {\r
-    gBS->FreePool (Buffer);\r
+    FreePool (Buffer);\r
     Buffer = NULL;\r
   }\r
 }\r
     Buffer = NULL;\r
   }\r
 }\r