diff options
author | ghelmer <ghelmer@FreeBSD.org> | 2000-05-30 13:27:33 +0000 |
---|---|---|
committer | ghelmer <ghelmer@FreeBSD.org> | 2000-05-30 13:27:33 +0000 |
commit | 4fe853adac45791690d79450e26988cf8acc45f9 (patch) | |
tree | f9eb1809f4c79024933b29ddc64654499bf06f52 /usr.sbin/sa | |
parent | a28e94024db2ad4e3a0b1c51284f6d69575d7014 (diff) | |
download | FreeBSD-src-4fe853adac45791690d79450e26988cf8acc45f9.zip FreeBSD-src-4fe853adac45791690d79450e26988cf8acc45f9.tar.gz |
Adjust the width of the first column in output from "sa -m" to match
the max length of user names.
PR: bin/10905
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
Diffstat (limited to 'usr.sbin/sa')
-rw-r--r-- | usr.sbin/sa/usrdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c index 38de520..0c7cb27 100644 --- a/usr.sbin/sa/usrdb.c +++ b/usr.sbin/sa/usrdb.c @@ -33,6 +33,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ +#include <sys/param.h> #include <sys/types.h> #include <sys/acct.h> #include <err.h> @@ -236,7 +237,7 @@ usracct_print() while (rv == 0) { ui = (struct userinfo *) data.data; - printf("%-8s %9qu ", + printf("%-*s %9qu ", MAXLOGNAME - 1, user_from_uid(ui->ui_uid, 0), ui->ui_calls); t = (double) (ui->ui_utime + ui->ui_stime) / |