aboutsummaryrefslogtreecommitdiffstats
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-17 23:56:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-17 23:56:37 -0400
commit1218259b2d09c79ed1113d3a6dbb9a1d6391f5cb (patch)
tree8f07cd39f6a5f74f41d5be34bc0d843428f04082 /lib/vsprintf.c
parentca9a702e50287cf429f1c12832319a26a715e70b (diff)
parent0efb4d20723d58edbad29d1ff98a86b631adb5e6 (diff)
Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (44 commits) vsnprintf: remove duplicate comment of vsnprintf softirq: add BLOCK_IOPOLL to softirq_to_name oprofile: fix oprofile regression: select RING_BUFFER_ALLOW_SWAP tracing: switch function prints from %pf to %ps vsprintf: add %ps that is the same as %pS but is like %pf tracing: Fix minor bugs for __unregister_ftrace_function_probe tracing: remove notrace from __kprobes annotation tracing: optimize global_trace_clock cachelines MAINTAINERS: Update tracing tree details ftrace: document function and function graph implementation tracing: make testing syscall events a separate configuration tracing: remove some unused macros ftrace: add compile-time check on F_printk() tracing: fix F_printk() typos tracing: have TRACE_EVENT macro use __flags to not shadow parameter tracing: add static to generated TRACE_EVENT functions ring-buffer: typecast cmpxchg to fix PowerPC warning tracing: add filter event logic to special, mmiotrace and boot tracers tracing: remove trace_event_types.h tracing: use the new trace_entries.h to create format files ...
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index cb8a112030bb..d320c1816a7b 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);
@@ -794,7 +794,8 @@ static char *ip4_addr_string(char *buf, char *end, const u8 *addr,
794 * 794 *
795 * - 'F' For symbolic function descriptor pointers with offset 795 * - 'F' For symbolic function descriptor pointers with offset
796 * - 'f' For simple symbolic function names without offset 796 * - 'f' For simple symbolic function names without offset
797 * - 'S' For symbolic direct pointers 797 * - 'S' For symbolic direct pointers with offset
798 * - 's' For symbolic direct pointers without offset
798 * - 'R' For a struct resource pointer, it prints the range of 799 * - 'R' For a struct resource pointer, it prints the range of
799 * addresses (not the name nor the flags) 800 * addresses (not the name nor the flags)
800 * - 'M' For a 6-byte MAC address, it prints the address in the 801 * - 'M' For a 6-byte MAC address, it prints the address in the
@@ -822,6 +823,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr,
822 case 'F': 823 case 'F':
823 case 'f': 824 case 'f':
824 ptr = dereference_function_descriptor(ptr); 825 ptr = dereference_function_descriptor(ptr);
826 case 's':
825 /* Fallthrough */ 827 /* Fallthrough */
826 case 'S': 828 case 'S':
827 return symbol_string(buf, end, ptr, spec, *fmt); 829 return symbol_string(buf, end, ptr, spec, *fmt);
@@ -1063,10 +1065,12 @@ qualifier:
1063 * @args: Arguments for the format string 1065 * @args: Arguments for the format string
1064 * 1066 *
1065 * This function follows C99 vsnprintf, but has some extensions: 1067 * This function follows C99 vsnprintf, but has some extensions:
1066 * %pS output the name of a text symbol 1068 * %pS output the name of a text symbol with offset
1069 * %ps output the name of a text symbol without offset
1067 * %pF output the name of a function pointer with its offset 1070 * %pF output the name of a function pointer with its offset
1068 * %pf output the name of a function pointer without its offset 1071 * %pf output the name of a function pointer without its offset
1069 * %pR output the address range in a struct resource 1072 * %pR output the address range in a struct resource
1073 * %n is ignored
1070 * 1074 *
1071 * The return value is the number of characters which would 1075 * The return value is the number of characters which would
1072 * be generated for the given input, excluding the trailing 1076 * be generated for the given input, excluding the trailing
@@ -1522,11 +1526,7 @@ EXPORT_SYMBOL_GPL(vbin_printf);
1522 * a binary buffer that generated by vbin_printf. 1526 * a binary buffer that generated by vbin_printf.
1523 * 1527 *
1524 * The format follows C99 vsnprintf, but has some extensions: 1528 * The format follows C99 vsnprintf, but has some extensions:
1525 * %pS output the name of a text symbol 1529 * see vsnprintf comment for details.
1526 * %pF output the name of a function pointer with its offset
1527 * %pf output the name of a function pointer without its offset
1528 * %pR output the address range in a struct resource
1529 * %n is ignored
1530 * 1530 *
1531 * The return value is the number of characters which would 1531 * The return value is the number of characters which would
1532 * be generated for the given input, excluding the trailing 1532 * be generated for the given input, excluding the trailing