X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=Documentation%2Fprintk-formats.txt;h=b784c270105f40e8320cd388cb9a8ef1e2d463f4;hb=refs%2Fheads%2Fkaro-tx6-stable;hp=2216eb187c213b4c0c5140a760f9df3098150e41;hpb=4a10a91756ef381bced7b88cfb9232f660b92d93;p=karo-tx-linux.git diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 2216eb187c21..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: @@ -119,6 +123,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 +239,7 @@ UUID/GUID addresses: Passed by reference. dentry names: + %pd{,2,3,4} %pD{,2,3,4} @@ -256,6 +262,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 +292,27 @@ 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. + +If you add other %p extensions, please extend lib/test_printf.c with +one or more test cases, if at all feasible. + + Thank you for your cooperation and attention.