diff options
author | Elliott Hughes <enh@google.com> | 2016-06-08 17:03:26 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-06-10 03:15:42 -0500 |
commit | 082dadce554e8a37eb34ea1f9a727feadea04073 (patch) | |
tree | be800428aba4fd793c4f3bce3a02ec0a282dd783 /toys | |
parent | 2efbbb33fd4a7774a30722fb73934810dfe37f91 (diff) | |
download | toybox-082dadce554e8a37eb34ea1f9a727feadea04073.tar.gz |
HACK: restore Android ps behavior.
"NAME" is no longer doing what we want; "TNAME" is what "NAME" used to be,
except that "TNAME" implies -T. This patch switches us over to "TNAME",
disables the implicit -T.
Change-Id: I5553703d3939b24eaf39976162d2f75a591e1ce8
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/ps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c index 4c66bcd6..9402b779 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -1194,7 +1194,7 @@ void ps_main(void) else if (toys.optflags&FLAG_l) not_o = "F,S,UID,%sPPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME,CMD"; else if (CFG_TOYBOX_ON_ANDROID) - not_o = "USER,%sPPID,VSIZE,RSS,WCHAN:10,ADDR:10=PC,S,NAME"; + not_o = "USER,%sPPID,VSIZE,RSS,WCHAN:10,ADDR:10=PC,S,TNAME"; sprintf(toybuf, not_o, (toys.optflags & FLAG_T) ? "PID,TID," : "PID,"); // Init TT.fields. This only uses toybuf if TT.ps.o is NULL @@ -1227,7 +1227,7 @@ void ps_main(void) if (!(toys.optflags&(FLAG_k|FLAG_M))) TT.show_process = (void *)show_ps; TT.match_process = ps_match_process; dt = dirtree_read("/proc", - ((toys.optflags&FLAG_T) || (TT.bits&(_PS_TID|_PS_TCNT|_PS_TNAME))) + ((toys.optflags&FLAG_T) || (TT.bits&(_PS_TID|_PS_TCNT/*|_PS_TNAME*/))) ? get_threads : get_ps); if (toys.optflags&(FLAG_k|FLAG_M)) { |