diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 20:52:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-25 20:52:22 -0400 |
commit | 94df491c4a01b39d81279a68386158eb02656712 (patch) | |
tree | ba431d9d74f11a7117883df54908ea39e4ef7c5c /lib/vsprintf.c | |
parent | 26ff6801f751cd47e44c2e9507ec08b447f2d2b9 (diff) | |
parent | 29096202176ceaa5016a17ea2dd1aea19a4e90e2 (diff) |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
futex: Fix WARN_ON() test for UP
WARN_ON_SMP(): Allow use in if() statements on UP
x86, dumpstack: Use %pB format specifier for stack trace
vsprintf: Introduce %pB format specifier
lockdep: Remove unused 'factor' variable from lockdep_stats_show()
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 02bcdd5feac4..bc0ac6b333dc 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -433,7 +433,9 @@ char *symbol_string(char *buf, char *end, void *ptr, | |||
433 | unsigned long value = (unsigned long) ptr; | 433 | unsigned long value = (unsigned long) ptr; |
434 | #ifdef CONFIG_KALLSYMS | 434 | #ifdef CONFIG_KALLSYMS |
435 | char sym[KSYM_SYMBOL_LEN]; | 435 | char sym[KSYM_SYMBOL_LEN]; |
436 | if (ext != 'f' && ext != 's') | 436 | if (ext == 'B') |
437 | sprint_backtrace(sym, value); | ||
438 | else if (ext != 'f' && ext != 's') | ||
437 | sprint_symbol(sym, value); | 439 | sprint_symbol(sym, value); |
438 | else | 440 | else |
439 | kallsyms_lookup(value, NULL, NULL, NULL, sym); | 441 | kallsyms_lookup(value, NULL, NULL, NULL, sym); |
@@ -808,6 +810,7 @@ int kptr_restrict = 1; | |||
808 | * - 'f' For simple symbolic function names without offset | 810 | * - 'f' For simple symbolic function names without offset |
809 | * - 'S' For symbolic direct pointers with offset | 811 | * - 'S' For symbolic direct pointers with offset |
810 | * - 's' For symbolic direct pointers without offset | 812 | * - 's' For symbolic direct pointers without offset |
813 | * - 'B' For backtraced symbolic direct pointers with offset | ||
811 | * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref] | 814 | * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref] |
812 | * - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201] | 815 | * - 'r' For raw struct resource, e.g., [mem 0x0-0x1f flags 0x201] |
813 | * - 'M' For a 6-byte MAC address, it prints the address in the | 816 | * - 'M' For a 6-byte MAC address, it prints the address in the |
@@ -867,6 +870,7 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
867 | /* Fallthrough */ | 870 | /* Fallthrough */ |
868 | case 'S': | 871 | case 'S': |
869 | case 's': | 872 | case 's': |
873 | case 'B': | ||
870 | return symbol_string(buf, end, ptr, spec, *fmt); | 874 | return symbol_string(buf, end, ptr, spec, *fmt); |
871 | case 'R': | 875 | case 'R': |
872 | case 'r': | 876 | case 'r': |
@@ -1134,6 +1138,7 @@ qualifier: | |||
1134 | * %ps output the name of a text symbol without offset | 1138 | * %ps output the name of a text symbol without offset |
1135 | * %pF output the name of a function pointer with its offset | 1139 | * %pF output the name of a function pointer with its offset |
1136 | * %pf output the name of a function pointer without its offset | 1140 | * %pf output the name of a function pointer without its offset |
1141 | * %pB output the name of a backtrace symbol with its offset | ||
1137 | * %pR output the address range in a struct resource with decoded flags | 1142 | * %pR output the address range in a struct resource with decoded flags |
1138 | * %pr output the address range in a struct resource with raw flags | 1143 | * %pr output the address range in a struct resource with raw flags |
1139 | * %pM output a 6-byte MAC address with colons | 1144 | * %pM output a 6-byte MAC address with colons |