From 5b8a5a5b344ac2dccb25a4dbb6007b4de0466ab6 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 16 Sep 2009 20:03:06 -0400 Subject: [PATCH] --- yaml --- r: 162980 b: refs/heads/master c: 91adcd2c4b104a8ce2973e6e84b01fd48735ffc6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/lib/vsprintf.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f4adb11e6a64..5a6554f05f6d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 45bd00d31de886f8425b4dd33204b911b0a466a9 +refs/heads/master: 91adcd2c4b104a8ce2973e6e84b01fd48735ffc6 diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index cb8a112030bb..c8f3ed62cee1 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -581,7 +581,7 @@ static char *symbol_string(char *buf, char *end, void *ptr, unsigned long value = (unsigned long) ptr; #ifdef CONFIG_KALLSYMS char sym[KSYM_SYMBOL_LEN]; - if (ext != 'f') + if (ext != 'f' && ext != 's') sprint_symbol(sym, value); else kallsyms_lookup(value, NULL, NULL, NULL, sym); @@ -822,6 +822,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, case 'F': case 'f': ptr = dereference_function_descriptor(ptr); + case 's': /* Fallthrough */ case 'S': return symbol_string(buf, end, ptr, spec, *fmt); @@ -1063,7 +1064,8 @@ static int format_decode(const char *fmt, struct printf_spec *spec) * @args: Arguments for the format string * * This function follows C99 vsnprintf, but has some extensions: - * %pS output the name of a text symbol + * %pS output the name of a text symbol with offset + * %ps output the name of a text symbol without offset * %pF output the name of a function pointer with its offset * %pf output the name of a function pointer without its offset * %pR output the address range in a struct resource