Date: Wed, 31 Jul 2013 04:52:00 GMT From: Danilo Egêa Gondolfo <danilogondolfo@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/180961: Fix top command format when JID with 4 characters is displayed Message-ID: <201307310452.r6V4q0XM034610@oldred.freebsd.org> Resent-Message-ID: <201307310500.r6V5004l076876@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 180961 >Category: bin >Synopsis: Fix top command format when JID with 4 characters is displayed >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: Wed Jul 31 05:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Danilo Egêa Gondolfo >Release: FreeBSD 9.2-BETA1 >Organization: >Environment: FreeBSD freebsd 9.2-BETA1 FreeBSD 9.2-BETA1 #7 r253479: Sat Jul 20 06:52:49 BRT 2013 root@freebsd:/usr/obj/usr/src/sys/PROJETO amd64 >Description: When JID is displayed with 4 letters, the screen shows an little bug. You can see it here https://dl.dropboxusercontent.com/u/23276705/top1.png >How-To-Repeat: >Fix: Patch attached with submission follows: --- machine.c.orig 2013-07-31 04:31:38.000000000 -0300 +++ machine.c 2013-07-31 04:29:31.000000000 -0300 @@ -406,7 +406,7 @@ (ps.thread ? smp_header : smp_header_thr) : (ps.thread ? up_header : up_header_thr); snprintf(Header, sizeof(Header), prehead, - ps.jail ? " JID" : "", + ps.jail ? " JID" : "", namelength, namelength, uname_field, ps.wcpu ? "WCPU" : "CPU"); break; @@ -800,7 +800,7 @@ int cpu, state; struct rusage ru, *rup; long p_tot, s_tot; - char *proc_fmt, thr_buf[6], jid_buf[6]; + char *proc_fmt, thr_buf[6], jid_buf[8]; char *cmdbuf = NULL; char **args; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307310452.r6V4q0XM034610>