From owner-freebsd-bugs Thu Apr 16 11:20:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA01643 for freebsd-bugs-outgoing; Thu, 16 Apr 1998 11:20:05 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA01635; Thu, 16 Apr 1998 11:20:02 -0700 (PDT) (envelope-from gnats) Received: from ns.altadena.net (ns.altadena.net [206.126.144.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA29997 for ; Thu, 16 Apr 1998 18:10:55 GMT (envelope-from pete@ns.altadena.net) Received: (from pete@localhost) by ns.altadena.net (8.8.8/8.8.6) id LAA14989; Thu, 16 Apr 1998 11:10:51 -0700 (PDT) Message-Id: <199804161810.LAA14989@ns.altadena.net> Date: Thu, 16 Apr 1998 11:10:51 -0700 (PDT) From: pete@altadena.net Reply-To: pete@altadena.net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/6325: Heading fix for 'w' on long-name systems Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6325 >Category: bin >Synopsis: Heading fix for 'w' on long-name systems >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 16 11:20:01 PDT 1998 >Last-Modified: >Originator: Pete Carah >Organization: Altadena Internet Communications >Release: FreeBSD 2.2.6-STABLE i386 >Environment: Any system based on 2.x which has been recompiled for user names longer than 8 characters >Description: w adjusted the user-name size for detail lines but not the header. Enclosed diff fixes this. (this should apply against any 2.x-stable; may alsp apply to -current (I haven't looked to see if it has been fixed there)) >How-To-Repeat: w (on any 2.x system with usernames > 8 chars) >Fix: *** w.c.orig Tue Apr 14 09:52:43 1998 --- w.c Tue Apr 14 09:56:11 1998 *************** *** 245,253 **** if (wcmd == 0) exit (0); ! #define HEADER "USER TTY FROM LOGIN@ IDLE WHAT\n" ! #define WUSED (sizeof (HEADER) - sizeof ("WHAT\n")) ! (void)printf(HEADER); } if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL) --- 245,256 ---- if (wcmd == 0) exit (0); ! #define HEADER1 "USER" ! #define HEADER2 "TTY FROM LOGIN@ IDLE WHAT\n" ! #define WUSED (sizeof (HEADER1) + sizeof(HEADER2) + 1 + UT_NAMESIZE - \ ! sizeof ("WHAT\n")) ! (void)printf("%-*.*s %s", UT_NAMESIZE, UT_NAMESIZE, HEADER1, ! HEADER2); } if ((kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nentries)) == NULL) >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message