Index: trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h	(revision 48747)
+++ trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h	(revision 48748)
@@ -477,4 +477,6 @@
 CHAR16 *VBoxDebugHandleDevicePath2Str(IN EFI_HANDLE hHandle);
 # endif
+VOID EFIAPI VBoxLogWorker(const char *pszFormat, ...);
+
 /** See RT_XSTR */
 # define VBOX_XSTR(str)                         VBOX_STR(str)
@@ -484,14 +486,22 @@
 #  define VBoxLogFlowFuncEnter()                DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": ENTER\n", __FUNCTION__))
 #  define VBoxLogFlowFuncLeave()                DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": LEAVE\n", __FUNCTION__))
-#  define VBoxLogFlowFuncLeaveRC(rc)            DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": LEAVE " #rc "=%r\n", \
-                                                       __FUNCTION__, rc))
 #  define VBoxLogFlowFuncMark()                 DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) "\n", __FUNCTION__))
-#  define VBoxLogFlowFuncMarkRC(rc)             DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #rc "=%r\n", __FUNCTION__, rc))
+#  define VBoxLogFlowFuncLeaveRC(rc) \
+    do { \
+        EFI_STATUS rcLog = (rc); \
+        DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": LEAVE " #rc "=0x%x (%r)\n", __FUNCTION__, rcLog, rcLog)); \
+    } while (0)
 #  define VBoxLogFlowFuncMarkVar(var, varfmt) \
-    DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) " " #var "=" varfmt "\n", __FUNCTION__, (var)))
-#  define VBoxLogFlowFuncMarkDP(dp)             DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", \
-                                                       __FUNCTION__, VBoxDebugDevicePath2Str(dp)))
-#  define VBoxLogFlowFuncMarkHandleDP(dp)       DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", \
-                                                       __FUNCTION__, VBoxDebugHandleDevicePath2Str(dp)))
+    DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #var "=" varfmt "\n", __FUNCTION__, (var)))
+#  define VBoxLogFlowFuncMarkRC(rc) \
+    do { \
+        EFI_STATUS rcLog = (rc); \
+        DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #rc "=0x%x (%r)\n", __FUNCTION__, rcLog, rcLog)); \
+    } while (0)
+#  define VBoxLogFlowFuncMarkDP(dp) \
+    DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", __FUNCTION__, VBoxDebugDevicePath2Str(dp)))
+#  define VBoxLogFlowFuncMarkHandleDP(dp)\
+    DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", __FUNCTION__, VBoxDebugHandleDevicePath2Str(dp)))
+#  define VBoxLog(a)                            VBoxLogWorker a
 # else
 #  define VBoxLogFlowFuncEnter()                do {} while (0)
@@ -499,8 +509,9 @@
 #  define VBoxLogFlowFuncLeaveRC(rc)            do {} while (0)
 #  define VBoxLogFlowFuncMark()                 do {} while (0)
+#  define VBoxLogFlowFuncMarkVar(var, varfmt)   do {} while (0)
 #  define VBoxLogFlowFuncMarkRC(rc)             do {} while (0)
-#  define VBoxLogFlowFuncMarkVar(var, varfmt)   do {} while (0)
 #  define VBoxLogFlowFuncMarkDP(dp)             do {} while (0)
 #  define VBoxLogLogFlowFuncMarkHandleDP(dp)    do {} while (0)
+#  define VBoxLog(a)                            do {} while (0)
 # endif
 #endif
Index: trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c	(revision 48747)
+++ trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c	(revision 48748)
@@ -67,4 +67,5 @@
     szBuf[cch] = '\0';
 
+    /* Output the log string. */
     SavedFlags = ASMIntDisableFlags();
 
@@ -76,5 +77,39 @@
 
     ASMSetFlags(SavedFlags);
-
+}
+
+/**
+ * Our own log worker function, avoid the dbg/00000xxx prefix and makes it clear
+ * which log statements we added..
+ *
+ * @param   pszFormat           Format string. EFI style!
+ * @param   ...                 Argument referneced in the format string.
+ */
+VOID EFIAPI
+VBoxLogWorker(const char *pszFormat, ...)
+{
+    CHAR8       szBuf[384];
+    VA_LIST     va;
+    UINTN       cch;
+    RTCCUINTREG SavedFlags;
+
+    VA_START(va, pszFormat);
+    cch = AsciiVSPrint(szBuf, sizeof(szBuf), pszFormat, va);
+    VA_END(va);
+
+    /* make sure it's terminated and doesn't end with a newline */
+    if (cch >= sizeof(szBuf))
+        cch = sizeof(szBuf) - 1;
+    while (cch > 0 && (szBuf[cch - 1] == '\n' || szBuf[cch - 1] == '\r'))
+        cch--;
+    szBuf[cch] = '\0';
+
+    /* Output the log string. */
+    SavedFlags = ASMIntDisableFlags();
+
+    VBoxPrintString(szBuf);
+    VBoxPrintChar('\n');
+
+    ASMSetFlags(SavedFlags);
 }
 
Index: trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c	(revision 48747)
+++ trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c	(revision 48748)
@@ -282,5 +282,5 @@
                                 pVolume);
 
-    VBoxLogFlowFuncMarkVar(Status, "%r");
+    VBoxLogFlowFuncMarkRC(Status);
     if (!EFI_ERROR(Status)) {
         // register the SimpleFileSystem protocol
