summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAndrew Boie <andrew.p.boie@intel.com>2016-08-19 12:34:50 -0700
committerAnas Nashif <anas.nashif@intel.com>2016-08-28 07:47:28 -0400
commit4c6480533699701c1e00d5b5d52b12530645cc7e (patch)
treee7666e1e7a560e8f059a05c99d7617b468407575 /misc
parent907a99933aa5ae506f314a27c936122357385c88 (diff)
printk: print leading '0x' for %p
Change-Id: I0140d1721ecaef47245e0fab61300c1dd44b9aff Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/printk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/printk.c b/misc/printk.c
index 2ac2b4fdc..a5bd8e4c1 100644
--- a/misc/printk.c
+++ b/misc/printk.c
@@ -107,9 +107,12 @@ static inline void _vprintk(const char *fmt, va_list ap)
_printk_dec_ulong(u);
break;
}
+ case 'p':
+ _char_out('0');
+ _char_out('x');
+ /* Fall through */
case 'x':
- case 'X':
- case 'p': {
+ case 'X': {
unsigned long x = va_arg(
ap, unsigned long);
_printk_hex_ulong(x);