diff options
author | Guy Helmer <ghelmer@FreeBSD.org> | 2000-05-30 13:27:33 +0000 |
---|---|---|
committer | Guy Helmer <ghelmer@FreeBSD.org> | 2000-05-30 13:27:33 +0000 |
commit | e35ba769a6af717fd9b06f11fb3541d5731bf616 (patch) | |
tree | 4357b10d4f317d60eca27993992d22f5d8b3ebf9 /usr.sbin/sa/usrdb.c | |
parent | 17cbfdc25962b17231ec27dd75973a1c9728311f (diff) | |
download | src-e35ba769a6af717fd9b06f11fb3541d5731bf616.tar.gz src-e35ba769a6af717fd9b06f11fb3541d5731bf616.zip |
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>
Notes
Notes:
svn path=/head/; revision=61089
Diffstat (limited to 'usr.sbin/sa/usrdb.c')
-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 38de520b22e8..0c7cb2746d46 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) / |