From b1625b09d98ad8e337fdfeb4d3680a3c90750f18 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 25 Dec 2009 20:07:48 +0000 Subject: [PATCH] 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. --- usr.bin/rwho/rwho.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index be82ad36d4dc..b41bed83aa64 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -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,