Merge "Fix ps <process name>"

This commit is contained in:
Dmitriy Ivanov 2014-11-03 16:13:29 +00:00 committed by Gerrit Code Review
commit cb8c583d49

View file

@ -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, "-");