aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-08-05 19:32:44 -0500
committerRob Landley <rob@landley.net>2014-08-05 19:32:44 -0500
commit2c2eaba63fd42442453b1ad87fadc7d02532ea28 (patch)
tree931936c85ac82694784e7a4044fa3c131754669c /toys/posix
parent9fdc1fe5033cbc8922e4bb65900b3696b7ae938d (diff)
downloadtoybox-2c2eaba63fd42442453b1ad87fadc7d02532ea28.tar.gz
Building busybox from source needs find -not (a synonym for posix's "!").
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/find.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 6b434c1e..b1aa6845 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -251,7 +251,8 @@ static int do_find(struct dirtree *new)
if (!test) test = 1;
else active = 0; // decision has been made until next ")"
}
-
+ } else if (!strcmp(s, "not")) {
+ if (check) not = !not;
// Mostly ignore NOP argument
} else if (!strcmp(s, "a") || !strcmp(s, "and")) {
if (not) goto error;