This was trivial to modify after all. Ok to apply?
Index: grep/ChangeLog =================================================================== RCS file: /cvsroot/grep/grep/ChangeLog,v retrieving revision 1.272 diff -p -u -r1.272 ChangeLog --- grep/ChangeLog 27 Sep 2005 14:50:20 -0000 1.272 +++ grep/ChangeLog 3 Nov 2005 03:50:08 -0000 @@ -1,3 +1,11 @@ +2005-11-03 Charles Levert <[EMAIL PROTECTED]> + + * src/grep.c (grep): For consistency, any error after a read() + in fillbuf() is reported for any type of files, now including + directories (which were exceptionally excluded up until now). + * src/grep.texi: Remove "or silently skip them" pertaining to + directories in these circumstances. + 2005-09-27 Stepan Kasal <[EMAIL PROTECTED]> * doc/grep.1: Fix a typo. Index: grep/src/grep.c =================================================================== RCS file: /cvsroot/grep/grep/src/grep.c,v retrieving revision 1.113 diff -p -u -r1.113 grep.c --- grep/src/grep.c 24 Aug 2005 07:28:29 -0000 1.113 +++ grep/src/grep.c 3 Nov 2005 03:49:49 -0000 @@ -1065,8 +1065,7 @@ grep (int fd, char const *file, struct s if (! fillbuf (save, stats)) { - if (! is_EISDIR (errno, file)) - suppressible_error (filename, errno); + suppressible_error (filename, errno); return 0; } @@ -1137,8 +1136,7 @@ grep (int fd, char const *file, struct s nlscan (beg); if (! fillbuf (save, stats)) { - if (! is_EISDIR (errno, file)) - suppressible_error (filename, errno); + suppressible_error (filename, errno); goto finish_grep; } } Index: grep/doc/grep.texi =================================================================== RCS file: /cvsroot/grep/grep/doc/grep.texi,v retrieving revision 1.56 diff -p -u -r1.56 grep.texi --- grep/doc/grep.texi 24 Aug 2005 07:28:29 -0000 1.56 +++ grep/doc/grep.texi 3 Nov 2005 03:50:01 -0000 @@ -346,11 +346,11 @@ skipped. If an input file is a directory, use @var{action} to process it. By default, @var{action} is @samp{read}, which means that directories are read just as if they were ordinary files (some operating systems -and filesystems disallow this, and will cause @command{grep} to print error -messages for every directory or silently skip them). If @var{action} is [EMAIL PROTECTED], directories are silently skipped. If @var{action} is [EMAIL PROTECTED], @command{grep} reads all files under each directory, -recursively; this is equivalent to the @samp{-r} option. +and filesystems disallow this, and will cause @command{grep} to print +one error message for every directory). +If @var{action} is @samp{skip}, directories are silently skipped. +If @var{action} is @samp{recurse}, @command{grep} reads all files under +each directory, recursively; this is equivalent to the @samp{-r} option. @item -H @itemx --with-filename