Author: mav
Date: Sat Feb  7 17:53:47 2015
New Revision: 278362
URL: https://svnweb.freebsd.org/changeset/base/278362

Log:
  Fix couple issues in ctlstat header printing.
  
  MFC after:    1 week

Modified:
  head/usr.bin/ctlstat/ctlstat.c

Modified: head/usr.bin/ctlstat/ctlstat.c
==============================================================================
--- head/usr.bin/ctlstat/ctlstat.c      Sat Feb  7 16:57:32 2015        
(r278361)
+++ head/usr.bin/ctlstat/ctlstat.c      Sat Feb  7 17:53:47 2015        
(r278362)
@@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context 
                                        (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 
 
                                        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");
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to