Changeset 48748 in vbox for trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib
- Timestamp:
- Sep 28, 2013 3:21:23 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/VBoxDebugLib.c
r48727 r48748 67 67 szBuf[cch] = '\0'; 68 68 69 /* Output the log string. */ 69 70 SavedFlags = ASMIntDisableFlags(); 70 71 … … 76 77 77 78 ASMSetFlags(SavedFlags); 78 79 } 80 81 /** 82 * Our own log worker function, avoid the dbg/00000xxx prefix and makes it clear 83 * which log statements we added.. 84 * 85 * @param pszFormat Format string. EFI style! 86 * @param ... Argument referneced in the format string. 87 */ 88 VOID EFIAPI 89 VBoxLogWorker(const char *pszFormat, ...) 90 { 91 CHAR8 szBuf[384]; 92 VA_LIST va; 93 UINTN cch; 94 RTCCUINTREG SavedFlags; 95 96 VA_START(va, pszFormat); 97 cch = AsciiVSPrint(szBuf, sizeof(szBuf), pszFormat, va); 98 VA_END(va); 99 100 /* make sure it's terminated and doesn't end with a newline */ 101 if (cch >= sizeof(szBuf)) 102 cch = sizeof(szBuf) - 1; 103 while (cch > 0 && (szBuf[cch - 1] == '\n' || szBuf[cch - 1] == '\r')) 104 cch--; 105 szBuf[cch] = '\0'; 106 107 /* Output the log string. */ 108 SavedFlags = ASMIntDisableFlags(); 109 110 VBoxPrintString(szBuf); 111 VBoxPrintChar('\n'); 112 113 ASMSetFlags(SavedFlags); 79 114 } 80 115
Note:
See TracChangeset
for help on using the changeset viewer.