This makes output more readable. Kernel provides an interface for pretty printed output. Use it.
Signed-off-by: Ralf Ramsauer <[email protected]> --- driver/sysfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/driver/sysfs.c b/driver/sysfs.c index 4959b56..b40da13 100644 --- a/driver/sysfs.c +++ b/driver/sysfs.c @@ -173,10 +173,10 @@ static ssize_t cpus_assigned_show(struct kobject *kobj, int written; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) - written = scnprintf(buf, PAGE_SIZE, "%*pb\n", + written = scnprintf(buf, PAGE_SIZE, "%*pbl\n", cpumask_pr_args(&cell->cpus_assigned)); #else - written = cpumask_scnprintf(buf, PAGE_SIZE, &cell->cpus_assigned); + written = cpulist_scnprintf(buf, PAGE_SIZE, &cell->cpus_assigned); written += scnprintf(buf + written, PAGE_SIZE - written, "\n"); #endif return written; @@ -200,10 +200,10 @@ static ssize_t cpus_failed_show(struct kobject *kobj, cpumask_set_cpu(cpu, cpus_failed); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) - written = scnprintf(buf, PAGE_SIZE, "%*pb\n", + written = scnprintf(buf, PAGE_SIZE, "%*pbl\n", cpumask_pr_args(cpus_failed)); #else - written = cpumask_scnprintf(buf, PAGE_SIZE, cpus_failed); + written = cpulist_scnprintf(buf, PAGE_SIZE, cpus_failed); written += scnprintf(buf + written, PAGE_SIZE - written, "\n"); #endif -- 2.9.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
