aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb/pidof.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/lsb/pidof.c')
-rw-r--r--toys/lsb/pidof.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/lsb/pidof.c b/toys/lsb/pidof.c
index 7285b6ae..70582a51 100644
--- a/toys/lsb/pidof.c
+++ b/toys/lsb/pidof.c
@@ -43,12 +43,12 @@ static int print_pid(pid_t pid, char * name)
xprintf("%*s", len+(!toys.exitval), toybuf);
toys.exitval = 0;
- return !(toys.optflags & FLAG_s);
+ return toys.optflags & FLAG_s;
}
void pidof_main(void)
{
toys.exitval = 1;
- for_each_pid_with_name_in(toys.optargs, print_pid);
+ name_to_pid(toys.optargs, print_pid);
if (!toys.exitval) xputc('\n');
}