From owner-svn-src-head@FreeBSD.ORG Fri Dec 25 20:07:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D68E71065670; Fri, 25 Dec 2009 20:07:48 +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 C55838FC08; Fri, 25 Dec 2009 20:07:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBPK7m9p070342; Fri, 25 Dec 2009 20:07:48 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBPK7mET070340; Fri, 25 Dec 2009 20:07:48 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912252007.nBPK7mET070340@svn.freebsd.org> From: Ed Schouten Date: Fri, 25 Dec 2009 20:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200997 - head/usr.bin/rwho X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2009 20:07:48 -0000 Author: ed Date: Fri Dec 25 20:07:48 2009 New Revision: 200997 URL: http://svn.freebsd.org/changeset/base/200997 Log: Let the width of the username column depend on the rwho file format. Right now the code uses UT_NAMESIZE, but this makes little sense, because rwho(1) parses files generated by rwhod(8). Not utmp(5) files. Modified: head/usr.bin/rwho/rwho.c Modified: head/usr.bin/rwho/rwho.c ============================================================================== --- head/usr.bin/rwho/rwho.c Fri Dec 25 20:04:36 2009 (r200996) +++ head/usr.bin/rwho/rwho.c Fri Dec 25 20:07:48 2009 (r200997) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include DIR *dirp; @@ -172,7 +171,7 @@ main(int argc, char *argv[]) (void)sprintf(buf, "%s:%-.*s", mp->myhost, sizeof(mp->myutmp.out_line), mp->myutmp.out_line); printf("%-*.*s %-*s %s", - UT_NAMESIZE, sizeof(mp->myutmp.out_name), + sizeof(mp->myutmp.out_name), sizeof(mp->myutmp.out_name), mp->myutmp.out_name, width, buf,