Date: Mon, 29 Nov 2004 10:45:32 GMT From: Defacto <defacto@cvd.pl> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/74506: bad top command display Message-ID: <200411291045.iATAjWxl093449@www.freebsd.org> Resent-Message-ID: <200411291050.iATAoSOV006542@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 74506 >Category: misc >Synopsis: bad top command display >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: Mon Nov 29 10:50:28 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Defacto >Release: 6.0-CURRENT >Organization: >Environment: FreeBSD test.build.priv 6.0-CURRENT FreeBSD 6.0-CURRENT #14: Mon Nov 29 09:16:05 CEST 2004 root@test.build.priv:/usr/src/sys/i386/compile/WORK i386 >Description: The top command displays improperly informative screen (general information lines) where on SMP systems exists in passwd user name longer than 12 chars or on non-SMP systems user name is longer than 14 chars. This applies to standard text console (80x25 chars). >How-To-Repeat: On SMP system: pw useradd 1234567890abc; top On non-SMP system: pw useradd 1234567890abcde; top >Fix: Apply following patch on /usr/src/usr.bin/top/machine.c: --- machine.c.org Mon Nov 29 09:50:14 2004 +++ machine.c Mon Nov 29 10:01:55 2004 @@ -234,10 +234,10 @@ } if (namelength < 8) namelength = 8; - if (smpmode && namelength > 13) - namelength = 13; - else if (namelength > 15) - namelength = 15; + if (smpmode && namelength > 12) + namelength = 12; + else if (namelength > 14) + namelength = 14; kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411291045.iATAjWxl093449>