diff options
author | Tejun Heo | 2015-02-13 23:37:42 +0100 |
---|---|---|
committer | Linus Torvalds | 2015-02-14 06:21:38 +0100 |
commit | f09068276c5cbe2dd76679b2c9fcc91e12eb7ebe (patch) | |
tree | bfbeeb101294d9b2d64afe06ceed124ca8ad3688 /net/core/sysctl_net_core.c | |
parent | tracing: use %*pb[l] to print bitmaps including cpumasks and nodemasks (diff) | |
download | kernel-qcow2-linux-f09068276c5cbe2dd76679b2c9fcc91e12eb7ebe.tar.gz kernel-qcow2-linux-f09068276c5cbe2dd76679b2c9fcc91e12eb7ebe.tar.xz kernel-qcow2-linux-f09068276c5cbe2dd76679b2c9fcc91e12eb7ebe.zip |
net: use %*pb[l] to print bitmaps including cpumasks and nodemasks
printk and friends can now format bitmaps using '%*pb[l]'. cpumask
and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
respectively which can be used to generate the two printf arguments
necessary to format the specified cpu/nodemask.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/core/sysctl_net_core.c')
-rw-r--r-- | net/core/sysctl_net_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index eaa51ddf2368..433424804284 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -155,7 +155,7 @@ write_unlock: rcu_read_unlock(); len = min(sizeof(kbuf) - 1, *lenp); - len = cpumask_scnprintf(kbuf, len, mask); + len = scnprintf(kbuf, len, "%*pb", cpumask_pr_args(mask)); if (!len) { *lenp = 0; goto done; |