=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/find/find.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/find/find.c 2009/10/27 23:59:38 1.14 +++ src/usr.bin/find/find.c 2011/04/21 01:14:21 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: find.c,v 1.14 2009/10/27 23:59:38 deraadt Exp $ */ +/* $OpenBSD: find.c,v 1.15 2011/04/21 01:14:21 jacekm Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -143,12 +143,15 @@ FTSENT *entry; /* shared with SIGINFO handler */ -void +int find_execute(PLAN *plan, /* search plan */ char **paths) /* array of pathnames to traverse */ { sigset_t fullset, oset; + int rval; PLAN *p; + + rval = 0; if (!(tree = fts_open(paths, ftsoptions, NULL))) err(1, "fts_open"); @@ -178,12 +181,14 @@ case FTS_NS: (void)fflush(stdout); warn("%s", entry->fts_path); + rval = 1; continue; } #define BADCH " \t\n\\'\"" if (isxargs && strpbrk(entry->fts_path, BADCH)) { (void)fflush(stdout); warnx("%s: illegal path", entry->fts_path); + rval = 1; continue; } @@ -196,4 +201,5 @@ ; } (void)fts_close(tree); + return (rval); }