summaryrefslogtreecommitdiffstats
path: root/usr.bin/lastcomm
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-04-11 18:50:51 +0000
committerache <ache@FreeBSD.org>1995-04-11 18:50:51 +0000
commitbf8d66ec753a59f2df4d1335d9f8501d109b3c56 (patch)
tree95b0281d9646f2d2636ff22ecda21bc1dfb46850 /usr.bin/lastcomm
parentb043f23fb9180e098327bfa2735b182129df950d (diff)
downloadFreeBSD-src-bf8d66ec753a59f2df4d1335d9f8501d109b3c56.zip
FreeBSD-src-bf8d66ec753a59f2df4d1335d9f8501d109b3c56.tar.gz
Fix output field range
Submitted by: edward@edcom.com
Diffstat (limited to 'usr.bin/lastcomm')
-rw-r--r--usr.bin/lastcomm/lastcomm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c
index 7c3c363..f8d90fc 100644
--- a/usr.bin/lastcomm/lastcomm.c
+++ b/usr.bin/lastcomm/lastcomm.c
@@ -135,8 +135,9 @@ main(argc, argv)
continue;
t = expand(ab.ac_utime) + expand(ab.ac_stime);
- (void)printf("%-*s %-7s %-*s %-*s %6.2f secs %.16s\n",
- fldsiz(acct, ac_comm), ab.ac_comm, flagbits(ab.ac_flag),
+ (void)printf("%-*.*s %-7s %-*s %-*s %6.2f secs %.16s\n",
+ fldsiz(acct, ac_comm), fldsiz(acct, ac_comm),
+ ab.ac_comm, flagbits(ab.ac_flag),
UT_NAMESIZE, user_from_uid(ab.ac_uid, 0),
UT_LINESIZE, getdev(ab.ac_tty),
t / (double)AHZ, ctime(&ab.ac_btime));
OpenPOWER on IntegriCloud