Skip to contentSkip to conversation

Documentation: add print bitmap description

PATCH Applied Wang Long 3 participants 3 messages Feb 26, 2015 – Feb 27, 2015 Documentation

lore
Share & tools
lore

Wang Long

author
#0 lore raw

PATCH 1/1 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.

---
 Documentation/printk-formats.txt | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/printk-formats.txt +9 -0
index 5a615c1..255a061 100644
@@ -239,6 +239,15 @@ s64 SHOULD be printed with %lld/%llx:
 
 	printk("%lld", s64_var);
 
+bitmap and its derivatives such as cpumask and nodemask:
+
+	%*pb	0779
+	%*pbl	0,3-6,8-10
+
+	For printing bitmap and its derivatives such as cpumask and nodemask,
+	%*pb output the bitmap with field width as the number of bits and %*pbl
+	output the bitmap as range list with field width as the number of bits.
+
 If <type> is dependent on a config option for its size (e.g., sector_t,
 blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a
 format specifier of its largest possible type and explicitly cast to it.
Signature · 1 line
1.8.3.4
maintainer Applied
#2 lore raw
In reply to Wang Long
Quoted 3 lines · On Thu, 26 Feb 2015 03:28:25 +0000 Wang Long <[email protected]> wrote:

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.

Applied to the docs tree.

Thanks,

jon