summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-11-03 16:13:29 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-03 16:13:30 +0000
commitcb8c583d493a98cd1499c64e7c68f3ac37ebb7cd (patch)
treec4dfe9eeed8308e2c8ff3c4fa4e1ad6f65f73b64
parentc6dead707de7c03bd9759b61143dd33cb1435cbc (diff)
parent65267bcc27b81088ab6183f7c4abf06c3ce3b297 (diff)
downloadsystem_core-cb8c583d493a98cd1499c64e7c68f3ac37ebb7cd.zip
system_core-cb8c583d493a98cd1499c64e7c68f3ac37ebb7cd.tar.gz
system_core-cb8c583d493a98cd1499c64e7c68f3ac37ebb7cd.tar.bz2
Merge "Fix ps <process name>"
-rw-r--r--toolbox/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toolbox/ps.c b/toolbox/ps.c
index 57b4280..4542bca 100644
--- a/toolbox/ps.c
+++ b/toolbox/ps.c
@@ -147,7 +147,7 @@ static int ps_line(int pid, int tid, char *namefilter)
strcpy(user,pw->pw_name);
}
- if(!namefilter || !strncmp(name, namefilter, strlen(namefilter))) {
+ if(!namefilter || !strncmp(cmdline[0] ? cmdline : name, namefilter, strlen(namefilter))) {
if (display_flags & SHOW_MACLABEL) {
fd = open(macline, O_RDONLY);
strcpy(macline, "-");