summaryrefslogtreecommitdiff
path: root/Documentation/printk-formats.txt
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2015-11-06 16:30:17 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 17:50:42 -0800
commit5e4ee7b13b522d07196e737f399843c58569604d (patch)
tree7f5b7b73d3b5548ef681f35b29363fdf4fc93205 /Documentation/printk-formats.txt
parent3e406b1d7c1e5c14c84a71eb4bee5f46ba690401 (diff)
printk: synchronize %p formatting documentation
Move all pointer-formatting documentation to one place in the code and one place in the documentation instead of keeping it in three places with different level of completeness. Documentation/printk-formats.txt has detailed information about each modifier, docstring above pointer() has short descriptions of them (as that is the function dealing with %p) and docstring above vsprintf() is removed as redundant. Both docstrings in the code that were modified are updated with a reminder of updating the documentation upon any further change. [akpm@linux-foundation.org: fix comment] Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> 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.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 2216eb187c21..9b8d7f746b1a 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -119,6 +119,7 @@ Raw buffer as an escaped string:
If field width is omitted the 1 byte only will be escaped.
Raw buffer as a hex string:
+
%*ph 00 01 02 ... 3f
%*phC 00:01:02: ... :3f
%*phD 00-01-02- ... -3f
@@ -234,6 +235,7 @@ UUID/GUID addresses:
Passed by reference.
dentry names:
+
%pd{,2,3,4}
%pD{,2,3,4}
@@ -256,6 +258,8 @@ struct va_format:
va_list *va;
};
+ Implements a "recursive vsnprintf".
+
Do not use this feature without some mechanism to verify the
correctness of the format string and va_list arguments.
@@ -284,6 +288,31 @@ bitmap and its derivatives such as cpumask and nodemask:
Passed by reference.
+Network device features:
+
+ %pNF 0x000000000000c000
+
+ For printing netdev_features_t.
+
+ Passed by reference.
+
+Command from struct task_struct
+
+ %pT ls
+
+ For printing executable name excluding path from struct
+ task_struct.
+
+ Passed by reference.
+
+Ignored argument:
+
+ %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.