From owner-svn-src-stable@FreeBSD.ORG Thu May 14 22:01:00 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1BEA106564A; Thu, 14 May 2009 22:01:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F17B8FC0A; Thu, 14 May 2009 22:01:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4EM109R003736; Thu, 14 May 2009 22:01:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4EM10EM003735; Thu, 14 May 2009 22:01:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905142201.n4EM10EM003735@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 May 2009 22:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192123 - stable/7/usr.sbin/pstat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 22:01:02 -0000 Author: ed Date: Thu May 14 22:01:00 2009 New Revision: 192123 URL: http://svn.freebsd.org/changeset/base/192123 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/7/usr.sbin/pstat/pstat.c Modified: stable/7/usr.sbin/pstat/pstat.c ============================================================================== --- stable/7/usr.sbin/pstat/pstat.c Thu May 14 21:53:35 2009 (r192122) +++ stable/7/usr.sbin/pstat/pstat.c Thu May 14 22:01:00 2009 (r192123) @@ -215,7 +215,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) @@ -348,9 +348,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,