Skip to content

Commit

Permalink
Documentation: add print bitmap description
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
datawolf authored and Jonathan Corbet committed Mar 20, 2015
1 parent ad4a6eb commit d072496
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Documentation/printk-formats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d072496

Please sign in to comment.