From ce3fd33d9a28a62373afe390a26a18bb76293279 Mon Sep 17 00:00:00 2001 From: mav Date: Sat, 14 Feb 2015 08:52:09 +0000 Subject: MFC r278362: Fix couple issues in ctlstat header printing. --- usr.bin/ctlstat/ctlstat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.bin/ctlstat') diff --git a/usr.bin/ctlstat/ctlstat.c b/usr.bin/ctlstat/ctlstat.c index e04aa54..3bfb248 100644 --- a/usr.bin/ctlstat/ctlstat.c +++ b/usr.bin/ctlstat/ctlstat.c @@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context *ctx) { (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx) == 0) ? " CPU" : ""); + (F_CPU(ctx)) ? " CPU" : ""); hdr_devs = 3; } else { if (F_CPU(ctx)) @@ -468,8 +468,9 @@ ctlstat_standard(struct ctlstat_context *ctx) { if (bit_test(ctx->lun_mask, lun) == 0) continue; - fprintf(stdout, "%15.6s%d ", - "lun", lun); + fprintf(stdout, "%15.6s%d %s", + "lun", lun, + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs++; } fprintf(stdout, "\n"); -- cgit v1.1