From owner-svn-src-stable-6@FreeBSD.ORG Thu May 14 22:01:14 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A814010657F7; Thu, 14 May 2009 22:01:14 +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 8ED488FC16; Thu, 14 May 2009 22:01:14 +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 n4EM1EOP003779; Thu, 14 May 2009 22:01:14 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4EM1Ewa003778; Thu, 14 May 2009 22:01:14 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200905142201.n4EM1Ewa003778@svn.freebsd.org> From: Ed Schouten Date: Thu, 14 May 2009 22:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192124 - stable/6/usr.sbin/pstat X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 22:01:18 -0000 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,