Commit 3a129cc2 authored by Adam Borowski's avatar Adam Borowski Committed by Petr Mladek
Browse files

vsprintf: avoid misleading "(null)" for %px

Like %pK already does, print "00000000" instead.

This confused people -- the convention is that "(null)" means you tried to
dereference a null pointer as opposed to printing the address.


To: Sergey Senozhatsky <>
To: Steven Rostedt <>
Cc: Andrew Morton <>
Cc: Joe Perches <>
Cc: Kees Cook <>
Cc: "Roberts, William C" <>
Cc: Linus Torvalds <>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Randy Dunlap <>
Cc: Geert Uytterhoeven <>
Signed-off-by: default avatarAdam Borowski <>
Signed-off-by: default avatarPetr Mladek <>
parent ab486bc9
......@@ -1849,7 +1849,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
const int default_width = 2 * sizeof(void *);
if (!ptr && *fmt != 'K') {
if (!ptr && *fmt != 'K' && *fmt != 'x') {
* Print (null) with the same width as a pointer so it makes
* tabular output look nice.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment