]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
[mirror_edk2.git] / ArmVirtPkg / Library / PlatformBootManagerLib / PlatformBm.c
index 1848042f86d001cacaae5ef8dfccd77ea43ef3af..02d6c87050602fd8288cee4f07409392d3bd60a2 100644 (file)
@@ -186,7 +186,7 @@ FilterAndProcess (
     //\r
     // This is not an error, just an informative condition.\r
     //\r
-    DEBUG ((EFI_D_VERBOSE, "%a: %g: %r\n", __FUNCTION__, ProtocolGuid,\r
+    DEBUG ((DEBUG_VERBOSE, "%a: %g: %r\n", __FUNCTION__, ProtocolGuid,\r
       Status));\r
     return;\r
   }\r
@@ -247,7 +247,7 @@ IsPciDisplay (
   Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, 0 /* Offset */,\r
                         sizeof Pci / sizeof (UINT32), &Pci);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));\r
     return FALSE;\r
   }\r
 \r
@@ -390,7 +390,7 @@ Connect (
                   NULL,   // RemainingDevicePath -- produce all children\r
                   FALSE   // Recursive\r
                   );\r
-  DEBUG ((EFI_ERROR (Status) ? EFI_D_ERROR : EFI_D_VERBOSE, "%a: %s: %r\n",\r
+  DEBUG ((EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n",\r
     __FUNCTION__, ReportText, Status));\r
 }\r
 \r
@@ -412,26 +412,26 @@ AddOutput (
 \r
   DevicePath = DevicePathFromHandle (Handle);\r
   if (DevicePath == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "%a: %s: handle %p: device path not found\n",\r
+    DEBUG ((DEBUG_ERROR, "%a: %s: handle %p: device path not found\n",\r
       __FUNCTION__, ReportText, Handle));\r
     return;\r
   }\r
 \r
   Status = EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: %s: adding to ConOut: %r\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", __FUNCTION__,\r
       ReportText, Status));\r
     return;\r
   }\r
 \r
   Status = EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a: %s: adding to ErrOut: %r\n", __FUNCTION__,\r
+    DEBUG ((DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", __FUNCTION__,\r
       ReportText, Status));\r
     return;\r
   }\r
 \r
-  DEBUG ((EFI_D_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __FUNCTION__,\r
+  DEBUG ((DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", __FUNCTION__,\r
     ReportText));\r
 }\r
 \r
@@ -605,13 +605,13 @@ RemoveStaleFvFileOptions (
     //\r
     Status = EfiBootManagerDeleteLoadOptionVariable (\r
                BootOptions[Index].OptionNumber, LoadOptionTypeBoot);\r
-    DEBUG_CODE (\r
+    DEBUG_CODE_BEGIN ();\r
       CHAR16 *DevicePathString;\r
 \r
       DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,\r
                            FALSE, FALSE);\r
       DEBUG ((\r
-        EFI_ERROR (Status) ? EFI_D_WARN : EFI_D_VERBOSE,\r
+        EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE,\r
         "%a: removing stale Boot#%04x %s: %r\n",\r
         __FUNCTION__,\r
         (UINT32)BootOptions[Index].OptionNumber,\r
@@ -621,7 +621,7 @@ RemoveStaleFvFileOptions (
       if (DevicePathString != NULL) {\r
         FreePool (DevicePathString);\r
       }\r
-      );\r
+    DEBUG_CODE_END ();\r
   }\r
 \r
   EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);\r