summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/grep/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index 447e8c5..75ed107 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -130,7 +130,9 @@ grep_tree(char **argv)
case FTS_DNR:
/* FALLTHROUGH */
case FTS_ERR:
- errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno));
+ notfound = true;
+ if(!sflag)
+ warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
break;
case FTS_D:
/* FALLTHROUGH */
OpenPOWER on IntegriCloud