diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-11-07 01:30:35 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-07 02:50:42 +0100 |
commit | d7ec9a05d6defda8432da574a2a888eed6fc29f6 (patch) | |
tree | 453b5229f8165523c17dd4bd0baa04a281ced611 /Documentation/printk-formats.txt | |
parent | selftests: run lib/test_printf module (diff) | |
download | linux-d7ec9a05d6defda8432da574a2a888eed6fc29f6.tar.xz linux-d7ec9a05d6defda8432da574a2a888eed6fc29f6.zip |
lib/vsprintf.c: update documentation
%n is no longer just ignored; it results in early return from vsnprintf.
Also add a request to add test cases for future %p extensions.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/printk-formats.txt')
-rw-r--r-- | Documentation/printk-formats.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 9b8d7f746b1a..b784c270105f 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -23,6 +23,10 @@ Example: Reminder: sizeof() result is of type size_t. +The kernel's printf does not support %n. For obvious reasons, floating +point formats (%e, %f, %g, %a) are also not recognized. Use of any +unsupported specifier or length qualifier results in a WARN and early +return from vsnprintf. Raw pointer value SHOULD be printed with %p. The kernel supports the following extended format specifiers for pointer types: @@ -305,13 +309,9 @@ Command from struct task_struct Passed by reference. -Ignored argument: +If you add other %p extensions, please extend lib/test_printf.c with +one or more test cases, if at all feasible. - %n %n - - The argument passed will be ignored. In other words, literal "%n" will - be in the output and the argument will be considered for next format - specifier. Thank you for your cooperation and attention. |