svn commit: r335881 - head/usr.bin/top
Cy Schubert
cy at FreeBSD.org
Tue Jul 3 02:54:33 UTC 2018
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:
More information about the svn-src-head
mailing list