(split out from the unlikely-to-be-accepted patch that tried to auto-size the PID column. i'll come back to that some day, but may as well get this trivial change in now.)
On Fri, Feb 15, 2019 at 4:31 PM enh <[email protected]> wrote: > > --- > toys/posix/ps.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/toys/posix/ps.c b/toys/posix/ps.c > index faddf685..ea383bfb 100644 > --- a/toys/posix/ps.c > +++ b/toys/posix/ps.c > @@ -1556,8 +1556,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))) { > -- > 2.21.0.rc0.258.g878e2cd30e-goog _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
