Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Dec 2009 20:07:48 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200997 - head/usr.bin/rwho
Message-ID:  <200912252007.nBPK7mET070340@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <time.h>
 #include <timeconv.h>
 #include <unistd.h>
-#include <utmp.h>
 
 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,



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