1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

- 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
This commit is contained in:
Gabor Kovesdan 2011-11-28 20:04:26 +00:00
parent f0c94259d6
commit ede01be2f2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228097

View File

@ -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 */