diff options
author | Cy Schubert <cy@FreeBSD.org> | 2018-07-03 02:54:32 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2018-07-03 02:54:32 +0000 |
commit | 4ee90e6e20bab628548f368150d92b9b2d4ae2e2 (patch) | |
tree | 28174131dd8a0709d3f027f8de0b7afeb67a62ae /usr.bin/top | |
parent | 8bedbb4d4280397035976593f3b877ad70cbe519 (diff) | |
download | src-test2-4ee90e6e20bab628548f368150d92b9b2d4ae2e2.tar.gz src-test2-4ee90e6e20bab628548f368150d92b9b2d4ae2e2.zip |
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.
Notes
Notes:
svn path=/head/; revision=335881
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/machine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index c44dec264a5d..bed80c508ce0 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -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: |