Commit a0c2e07d authored by Tejun Heo's avatar Tejun Heo Committed by Linus Torvalds

proc: 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: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4497da6f
...@@ -316,12 +316,10 @@ static inline void task_context_switch_counts(struct seq_file *m, ...@@ -316,12 +316,10 @@ static inline void task_context_switch_counts(struct seq_file *m,
static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
{ {
seq_puts(m, "Cpus_allowed:\t"); seq_printf(m, "Cpus_allowed:\t%*pb\n",
seq_cpumask(m, &task->cpus_allowed); cpumask_pr_args(&task->cpus_allowed));
seq_putc(m, '\n'); seq_printf(m, "Cpus_allowed_list:\t%*pbl\n",
seq_puts(m, "Cpus_allowed_list:\t"); cpumask_pr_args(&task->cpus_allowed));
seq_cpumask_list(m, &task->cpus_allowed);
seq_putc(m, '\n');
} }
int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, int proc_pid_status(struct seq_file *m, struct pid_namespace *ns,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment