diff options
author | Wang Long <long.wanglong@huawei.com> | 2015-02-25 22:28:25 -0500 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2015-03-20 09:41:55 -0400 |
commit | d0724961552f2b7da89e4b822b985f3c9fd13b79 (patch) | |
tree | 0fdcb4567e61e6313109c55e4acce7f43d21342f /Documentation/printk-formats.txt | |
parent | ad4a6ebeffd2767bdcdec9e1acea7ffc00d5be2d (diff) |
Documentation: add print bitmap description
as the commit: "lib/vsprintf: implement bitmap printing through
'%*pb[l]'" add an easy way to print bitmaps. so printk-formats.txt
should reflect it.
Signed-off-by: Wang Long <long.wanglong@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/printk-formats.txt')
-rw-r--r-- | Documentation/printk-formats.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5a615c14f75d..255a061e4309 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -239,6 +239,15 @@ s64 SHOULD be printed with %lld/%llx: | |||
239 | 239 | ||
240 | printk("%lld", s64_var); | 240 | printk("%lld", s64_var); |
241 | 241 | ||
242 | bitmap and its derivatives such as cpumask and nodemask: | ||
243 | |||
244 | %*pb 0779 | ||
245 | %*pbl 0,3-6,8-10 | ||
246 | |||
247 | For printing bitmap and its derivatives such as cpumask and nodemask, | ||
248 | %*pb output the bitmap with field width as the number of bits and %*pbl | ||
249 | output the bitmap as range list with field width as the number of bits. | ||
250 | |||
242 | If <type> is dependent on a config option for its size (e.g., sector_t, | 251 | If <type> is dependent on a config option for its size (e.g., sector_t, |
243 | blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a | 252 | blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a |
244 | format specifier of its largest possible type and explicitly cast to it. | 253 | format specifier of its largest possible type and explicitly cast to it. |