diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vsprintf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index cb8a112030bb..c8f3ed62cee1 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -581,7 +581,7 @@ static char *symbol_string(char *buf, char *end, void *ptr, | |||
581 | unsigned long value = (unsigned long) ptr; | 581 | unsigned long value = (unsigned long) ptr; |
582 | #ifdef CONFIG_KALLSYMS | 582 | #ifdef CONFIG_KALLSYMS |
583 | char sym[KSYM_SYMBOL_LEN]; | 583 | char sym[KSYM_SYMBOL_LEN]; |
584 | if (ext != 'f') | 584 | if (ext != 'f' && ext != 's') |
585 | sprint_symbol(sym, value); | 585 | sprint_symbol(sym, value); |
586 | else | 586 | else |
587 | kallsyms_lookup(value, NULL, NULL, NULL, sym); | 587 | kallsyms_lookup(value, NULL, NULL, NULL, sym); |
@@ -822,6 +822,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
822 | case 'F': | 822 | case 'F': |
823 | case 'f': | 823 | case 'f': |
824 | ptr = dereference_function_descriptor(ptr); | 824 | ptr = dereference_function_descriptor(ptr); |
825 | case 's': | ||
825 | /* Fallthrough */ | 826 | /* Fallthrough */ |
826 | case 'S': | 827 | case 'S': |
827 | return symbol_string(buf, end, ptr, spec, *fmt); | 828 | return symbol_string(buf, end, ptr, spec, *fmt); |
@@ -1063,7 +1064,8 @@ qualifier: | |||
1063 | * @args: Arguments for the format string | 1064 | * @args: Arguments for the format string |
1064 | * | 1065 | * |
1065 | * This function follows C99 vsnprintf, but has some extensions: | 1066 | * This function follows C99 vsnprintf, but has some extensions: |
1066 | * %pS output the name of a text symbol | 1067 | * %pS output the name of a text symbol with offset |
1068 | * %ps output the name of a text symbol without offset | ||
1067 | * %pF output the name of a function pointer with its offset | 1069 | * %pF output the name of a function pointer with its offset |
1068 | * %pf output the name of a function pointer without its offset | 1070 | * %pf output the name of a function pointer without its offset |
1069 | * %pR output the address range in a struct resource | 1071 | * %pR output the address range in a struct resource |