Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2009 22:01:14 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r192124 - stable/6/usr.sbin/pstat
Message-ID:  <200905142201.n4EM1Ewa003778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Thu May 14 22:01:14 2009
New Revision: 192124
URL: http://svn.freebsd.org/changeset/base/192124

Log:
  Make the layout of pstat -t less awful.
  
  Right now we have a device named "consolectl", but pstat only reserves 7
  columns for the device name. Increase it to 10 to make it fit.
  
  This patch only applies to pre-MPSAFE TTY.

Modified:
  stable/6/usr.sbin/pstat/pstat.c

Modified: stable/6/usr.sbin/pstat/pstat.c
==============================================================================
--- stable/6/usr.sbin/pstat/pstat.c	Thu May 14 22:01:00 2009	(r192123)
+++ stable/6/usr.sbin/pstat/pstat.c	Thu May 14 22:01:14 2009	(r192124)
@@ -209,7 +209,7 @@ static const char fhdr64[] =
 /* c000000000000000 ------ RWAI 123 123 c000000000000000 1000000000000000 */
 
 static const char hdr[] =
-"  LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC\n";
+"     LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC\n";
 
 static void
 ttymode_kvm(void)
@@ -342,9 +342,9 @@ ttyprt(struct xtty *xt)
 		errx(1, "struct xtty size mismatch");
 	if (usenumflag || xt->xt_dev == 0 ||
 	   (name = devname(xt->xt_dev, S_IFCHR)) == NULL)
-		printf("   %2d,%-2d", major(xt->xt_dev), minor(xt->xt_dev));
+		printf("%5d,%4d ", major(xt->xt_dev), minor(xt->xt_dev));
 	else
-		(void)printf("%7s ", name);
+		(void)printf("%10s ", name);
 	(void)printf("%2ld %3ld ", xt->xt_rawcc, xt->xt_cancc);
 	(void)printf("%3ld %5d %5d %4d %3d %7d ", xt->xt_outcc,
 		xt->xt_ihiwat, xt->xt_ilowat, xt->xt_ohiwat, xt->xt_olowat,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905142201.n4EM1Ewa003778>