diff options
author | Alexander Motin <mav@FreeBSD.org> | 2015-02-07 17:53:47 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2015-02-07 17:53:47 +0000 |
commit | d5a6319ac7849a7191e8b6b2b129400be89d032c (patch) | |
tree | ca0a3d5218e1634018a59dbed6475218f9ce05a9 /usr.bin/ctlstat | |
parent | 57fd0bcf035457e8a77962ce33e2951c5310a0d7 (diff) | |
download | src-test-d5a6319ac7849a7191e8b6b2b129400be89d032c.tar.gz src-test-d5a6319ac7849a7191e8b6b2b129400be89d032c.zip |
Fix couple issues in ctlstat header printing.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=278362
Diffstat (limited to 'usr.bin/ctlstat')
-rw-r--r-- | usr.bin/ctlstat/ctlstat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ctlstat/ctlstat.c b/usr.bin/ctlstat/ctlstat.c index e04aa5405bb11..3bfb248843579 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"); |