mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
grep: Suppress EISDIR when reading.
MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: kevans
This commit is contained in:
parent
1621861810
commit
caf5283fc9
1 changed files with 2 additions and 0 deletions
|
|
@ -72,6 +72,8 @@ grep_refill(struct file *f)
|
|||
bufrem = 0;
|
||||
|
||||
nr = read(f->fd, buffer, MAXBUFSIZ);
|
||||
if (nr < 0 && errno == EISDIR)
|
||||
nr = 0;
|
||||
if (nr < 0)
|
||||
return (-1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue