From 3c19d218593957f57def289dce367b4d441fb46d Mon Sep 17 00:00:00 2001 From: Michel Machado Date: Tue, 11 Feb 2020 07:49:55 -0500 Subject: [PATCH] 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 --- libdevs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdevs.c b/libdevs.c index 39e7072..bb47fb6 100644 --- a/libdevs.c +++ b/libdevs.c @@ -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. */