Provide error messages for files we can open but not read (ala directories).
diff --git a/toys/posix/grep.c b/toys/posix/grep.c
index c7b44e5..891f760 100644
--- a/toys/posix/grep.c
+++ b/toys/posix/grep.c
@@ -102,7 +102,10 @@
int mmatch = 0;
lcount++;
- if (0 > (len = getdelim(&line, &unused, TT.indelim, file))) break;
+ errno = 0;
+ len = getdelim(&line, &unused, TT.indelim, file);
+ if (errno) perror_msg("%s", name);
+ if (len<1) break;
if (line[len-1] == TT.indelim) line[len-1] = 0;
start = line;