svn commit: r336174 - head/usr.bin/top
Mark Johnston
markj at FreeBSD.org
Tue Jul 10 17:20:28 UTC 2018
Author: markj
Date: Tue Jul 10 17:20:27 2018
New Revision: 336174
URL: https://svnweb.freebsd.org/changeset/base/336174
Log:
Fix thread state summary line display after r334918.
Modified:
head/usr.bin/top/display.c
Modified: head/usr.bin/top/display.c
==============================================================================
--- head/usr.bin/top/display.c Tue Jul 10 17:01:19 2018 (r336173)
+++ head/usr.bin/top/display.c Tue Jul 10 17:20:27 2018 (r336174)
@@ -347,12 +347,12 @@ i_procstates(int total, int *brkdn)
procstates_buffer = setup_buffer(procstates_buffer, 0);
/* write current number of processes and remember the value */
- printf("%d %s:", total, (ps.thread) ? "threads" :"processes");
+ printf("%d %s:", total, ps.thread ? "threads" : "processes");
ltotal = total;
/* put out enough spaces to get to column 15 */
i = digits(total);
- while (i++ < 4)
+ while (i++ < (ps.thread ? 6 : 4))
{
putchar(' ');
}
@@ -389,10 +389,10 @@ else {
/* if number of digits differs, rewrite the label */
if (digits(total) != digits(ltotal))
{
- fputs(" processes:", stdout);
+ printf(" %s:", ps.thread ? "threads" : "processes");
/* put out enough spaces to get to column 15 */
i = digits(total);
- while (i++ < 4)
+ while (i++ < (ps.thread ? 6 : 4))
{
putchar(' ');
}
More information about the svn-src-head
mailing list