projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f4fac5
)
find: handle leading -- argument
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 6 Jan 2019 18:58:18 +0000
(19:58 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 6 Jan 2019 18:58:18 +0000
(19:58 +0100)
function old new delta
find_main 464 478 +14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
findutils/find.c
patch
|
blob
|
history
diff --git
a/findutils/find.c
b/findutils/find.c
index 6407c6c5afd2c623ba532975932e17db23de6c14..06ad1b39c4848aee329772f32d877df163412730 100644
(file)
--- a/
findutils/find.c
+++ b/
findutils/find.c
@@
-1467,6
+1467,12
@@
int find_main(int argc UNUSED_PARAM, char **argv)
break;
if (!saved[1])
break; /* it is "-" */
+ if (saved[1] == '-' && !saved[2]) {
+ /* it is "--" */
+ /* Try: find -- /dev/null */
+ saved = *++past_HLP;
+ break;
+ }
if ((saved+1)[strspn(saved+1, "HLP")] != '\0')
break;
}