From 702b4f04ea3f850e8fecc92e9d80f693000989db Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 27 May 2011 22:14:49 +0000 Subject: [PATCH] find: If a part of an expression is unknown, do not call it an option. Although most of the primaries and operators start with "-", they are not options. Examples: find . -xyz find . -name xyz -or bad MFC after: 1 week --- usr.bin/find/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index b2374e6d8d1..f8745b24c2c 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -172,7 +172,7 @@ find_create(char ***argvp) argv = *argvp; if ((p = lookup_option(*argv)) == NULL) - errx(1, "%s: unknown option", *argv); + errx(1, "%s: unknown primary or operator", *argv); ++argv; new = (p->create)(p, &argv);