From owner-svn-src-all@freebsd.org Tue Jul 3 02:54:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12376FF1963; Tue, 3 Jul 2018 02:54:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC5B086C8A; Tue, 3 Jul 2018 02:54:32 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E48A163D9; Tue, 3 Jul 2018 02:54:32 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w632sWEx039798; Tue, 3 Jul 2018 02:54:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w632sWAs039797; Tue, 3 Jul 2018 02:54:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201807030254.w632sWAs039797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 3 Jul 2018 02:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335881 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 335881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 02:54:33 -0000 Author: cy Date: Tue Jul 3 02:54:32 2018 New Revision: 335881 URL: https://svnweb.freebsd.org/changeset/base/335881 Log: When toggling the display using the "m" command to toggle from 'cpu' mode to 'io' mode, an artifact remains because the buffer is not "finished" with a NULL terminator using sbuf_finish(). An example of this is, when the "m" command is entered, the title line will contain COMMANDND instead of COMMAND. This commit fixes this. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Tue Jul 3 02:50:07 2018 (r335880) +++ head/usr.bin/top/machine.c Tue Jul 3 02:54:32 2018 (r335881) @@ -408,6 +408,7 @@ format_header(const char *uname_field) ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : "", namelength, namelength, uname_field); sbuf_cat(header, " VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND"); + sbuf_finish(header); break; } case DISP_MAX: