From owner-freebsd-bugs Thu Apr 1 9:10:18 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2DBE01524A for ; Thu, 1 Apr 1999 09:10:17 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id JAA86731; Thu, 1 Apr 1999 09:10:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 20EEA14E3E for ; Thu, 1 Apr 1999 09:06:53 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from scientia.demon.co.uk (ident=ben) by scientia.demon.co.uk with local (Exim 2.12 #4) id 10Skpn-000Mvm-00 for FreeBSD-gnats-submit@freebsd.org; Thu, 1 Apr 1999 18:00:51 +0100 (envelope-from ben@scientia.demon.co.uk) Message-Id: Date: Thu, 1 Apr 1999 18:00:51 +0100 From: Ben Smithurst Reply-To: ben@scientia.demon.co.uk To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/10905: sa(8) is hard coded for 8 character user names Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10905 >Category: bin >Synopsis: sa(8) is hard coded for 8 character user names >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 1 09:10:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Ben Smithurst >Release: FreeBSD 3.1-STABLE i386 >Organization: >Environment: Any system without 8 character user names, such as -current, -stable, 3.*-release >Description: When doing `sa -m', the width of the first column is hard coded for 8 character user names. Not really very serious, I suppose, but probably a bug all the same. Or possibly there is a reason for this, but I don't see a valid reason. >How-To-Repeat: >Fix: --- usrdb.c.orig Thu Apr 1 17:54:27 1999 +++ usrdb.c Thu Apr 1 17:56:11 1999 @@ -33,6 +33,7 @@ "$Id: usrdb.c,v 1.6 1997/10/15 06:41:19 charnier Exp $"; #endif /* not lint */ +#include #include #include #include @@ -236,7 +237,7 @@ 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) / >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message