Changeset 68995 in vbox for trunk/src/VBox/Runtime/r0drv/darwin
- Timestamp:
- Oct 6, 2017 7:46:09 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 118264
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/rtStrFormatKernelAddress-r0drv-darwin.cpp
r68994 r68995 30 30 *********************************************************************************************************************************/ 31 31 #define LOG_GROUP RTLOGGROUP_STRING 32 #include "the- linux-kernel.h"32 #include "the-darwin-kernel.h" 33 33 #include "internal/iprt.h" 34 34 … … 42 42 signed int cchPrecision, unsigned int fFlags) 43 43 { 44 #if !defined(DEBUG) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) 45 RT_NOREF(cchWidth, cchPrecision); 46 /* use the Linux kernel function which is able to handle "%pK" */ 47 static const char s_szFmt[] = "0x%pK"; 48 const char *pszFmt = s_szFmt; 49 if (!(fFlags & RTSTR_F_SPECIAL)) 50 pszFmt += 2; 51 return scnprintf(pszBuf, cbBuf, pszFmt, uPtr); 52 #else 44 /* 45 * Kernel addresses don't need obfuscation in R0 because the kernel log is only accessible 46 * as root. 47 */ 53 48 Assert(cbBuf >= 64); 54 49 return RTStrFormatNumber(pszBuf, uPtr, 16, cchWidth, cchPrecision, fFlags); 55 #endif56 50 }
Note:
See TracChangeset
for help on using the changeset viewer.