]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/GenericBdsLib/BdsMisc.c
Clean up GenericBdsLib library Instance.
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / BdsMisc.c
index 084fa0de4ba15771d894781d9a62477af822a101..c96aa23cabde29c6536e1ecdc5c0292098b2a2c4 100644 (file)
@@ -17,8 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define MAX_STRING_LEN        200\r
 \r
-static BOOLEAN   mFeaturerSwitch = TRUE;\r
-static BOOLEAN   mResetRequired = FALSE;\r
+BOOLEAN   mFeaturerSwitch = TRUE;\r
+BOOLEAN   mResetRequired = FALSE;\r
 \r
 extern UINT16 gPlatformBootTimeOutDefault;\r
 \r
@@ -174,8 +174,8 @@ BdsLibLoadDrivers (
 \r
 \r
 /**\r
-  Get the Option Number that does not used\r
-  Try to locate the specific option variable one by one untile find a free number\r
+  Get the Option Number that does not used.\r
+  Try to locate the specific option variable one by one untile find a free number.\r
 \r
   @param  VariableName          Indicate if the boot#### or driver#### option\r
 \r
@@ -432,7 +432,7 @@ BdsLibRegisterNewOption (
 \r
 /**\r
   Build the boot#### or driver#### option from the VariableName, the\r
-  build boot#### or driver#### will also be linked to BdsCommonOptionList\r
+  build boot#### or driver#### will also be linked to BdsCommonOptionList.\r
 \r
   @param  BdsCommonOptionList   The header of the boot#### or driver#### option\r
                                 link list\r
@@ -774,7 +774,7 @@ BdsLibMatchDevicePaths (
   EFI_DEVICE_PATH_PROTOCOL  *DevicePathInst;\r
   UINTN                     Size;\r
 \r
-  if (!Multi || !Single) {\r
+  if (Multi != NULL || Single  != NULL) {\r
     return FALSE;\r
   }\r
 \r
@@ -820,19 +820,19 @@ BdsLibOutputStrings (
   ...\r
   )\r
 {\r
-  VA_LIST     args;\r
+  VA_LIST     Args;\r
   EFI_STATUS  Status;\r
   CHAR16      *String;\r
 \r
   Status = EFI_SUCCESS;\r
-  VA_START (args, ConOut);\r
+  VA_START (Args, ConOut);\r
 \r
   while (!EFI_ERROR (Status)) {\r
     //\r
     // If String is NULL, then it's the end of the list\r
     //\r
-    String = VA_ARG (args, CHAR16 *);\r
-    if (!String) {\r
+    String = VA_ARG (Args, CHAR16 *);\r
+    if (String != NULL) {\r
       break;\r
     }\r
 \r
@@ -992,13 +992,12 @@ SetupResetReminder (
 \r
 \r
 /**\r
-  Get the headers (dos, image, optional header) from an image\r
+  Get the headers (dos, image, optional header) from an image.\r
 \r
   @param  Device                SimpleFileSystem device handle\r
   @param  FileName              File name for the image\r
   @param  DosHeader             Pointer to dos header\r
-  @param  ImageHeader           Pointer to image header\r
-  @param  OptionalHeader        Pointer to optional header\r
+  @param  Hdr                   Pointer to optional header\r
 \r
   @retval EFI_SUCCESS           Successfully get the machine type.\r
   @retval EFI_NOT_FOUND         The file is not found.\r
@@ -1130,30 +1129,25 @@ BdsLibGetImageHeader (
   return Status;\r
 }\r
 \r
-VOID\r
-EFIAPI\r
-BdsSetMemoryTypeInformationVariable (\r
-  EFI_EVENT  Event,\r
-  VOID       *Context\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   This routine is a notification function for legayc boot or exit boot\r
   service event. It will adjust the memory information for different\r
-  memory type and save them into the variables for next boot\r
+  memory type and save them into the variables for next boot.\r
 \r
-Arguments:\r
 \r
-  Event    - The event that triggered this notification function\r
-  Context  - Pointer to the notification functions context\r
+  @param Event           The event that triggered this notification function.\r
+  @param Context         Pointer to the notification functions context.\r
 \r
-Returns:\r
+           EDES_TODO: Incomplete Descriptions  None.\r
 \r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+EFIAPI\r
+BdsSetMemoryTypeInformationVariable (\r
+  EFI_EVENT  Event,\r
+  VOID       *Context\r
+  )\r
 {\r
   EFI_STATUS                   Status;\r
   EFI_MEMORY_TYPE_INFORMATION  *PreviousMemoryTypeInformation;\r
@@ -1253,7 +1247,7 @@ Returns:
 \r
 /**\r
   This routine register a function to adjust the different type memory page number just before booting\r
-  and save the updated info into the variable for next boot to use\r
+  and save the updated info into the variable for next boot to use.\r
 \r
 **/\r
 VOID\r