f3probe: allow errno == ENODATA when calling read(2)

The errno ENODATA is not documented in the manual, but according
to the comment the following comment, it behaves like EIO.

https://github.com/AltraMayor/f3/issues/82#issuecomment-584409275
This commit is contained in:
Michel Machado 2020-02-11 07:49:55 -05:00
parent 7e29f43a60
commit 3c19d21859

View File

@ -415,7 +415,7 @@ static int read_all(int fd, char *buf, size_t count)
if (rc < 0) {
if (errno == EINTR)
continue;
assert(errno == EIO);
assert(errno == EIO || errno == ENODATA);
return - errno;
}
assert(rc != 0); /* We should never hit the end of the file. */