summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorgabor <gabor@FreeBSD.org>2011-11-28 20:04:26 +0000
committergabor <gabor@FreeBSD.org>2011-11-28 20:04:26 +0000
commit8202ac2d5fc44ca18146bf83215d0d81e19f3601 (patch)
tree229b22cde08b6fedb02d057c462eb03e633e23eb /usr.bin
parent7b8d844d3a215213a277d9a84b016fda9fcdc3ea (diff)
downloadFreeBSD-src-8202ac2d5fc44ca18146bf83215d0d81e19f3601.zip
FreeBSD-src-8202ac2d5fc44ca18146bf83215d0d81e19f3601.tar.gz
- Call warnx() instead of errx() if a directory is not readable when using
a recursive search. This is the expected behavior instead of aborting. PR: bin/162907 Submitted by: Jan Beich <jbeich@tormail.net> MFC after: 3 days
Diffstat (limited to 'usr.bin')
-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