aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/ps.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-02-15 16:30:56 -0800
committerRob Landley <rob@landley.net>2019-02-16 16:20:09 -0600
commitc81f9151fec1e8f07fb039b2580c1a1b47e506f6 (patch)
tree3b4cbcb0a6eb75f913755276c7e9152505616732 /toys/posix/ps.c
parent10ef89219027856c65b0138203f338ecb2ce5054 (diff)
downloadtoybox-c81f9151fec1e8f07fb039b2580c1a1b47e506f6.tar.gz
top: differentiate tasks (processes) and threads in the header.
Diffstat (limited to 'toys/posix/ps.c')
-rw-r--r--toys/posix/ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 19292c98..2e5338ea 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1557,8 +1557,8 @@ static void top_common(
for (i = 0; i<mix.count; i++)
run[1+stridx("RSTZ", *string_field(mix.tb[i], &field))]++;
sprintf(toybuf,
- "Tasks: %d total,%4ld running,%4ld sleeping,%4ld stopped,"
- "%4ld zombie", mix.count, run[1], run[2], run[3], run[4]);
+ "%ss: %d total,%4ld running,%4ld sleeping,%4ld stopped,%4ld zombie",
+ FLAG(H)?"Thread":"Task", mix.count, run[1], run[2], run[3], run[4]);
lines = header_line(lines, 0);
if (readfile("/proc/meminfo", toybuf, sizeof(toybuf))) {