f3probe: make read_all() return negative errors

bdev_read_block(), who calls read_all(), is
expected to return negative errors.
This commit is contained in:
Michel Machado 2015-02-02 10:39:06 -05:00
parent ac2d89a0b9
commit 8001dfdadd

View File

@ -322,7 +322,7 @@ static int read_all(int fd, char *buf, int count)
ssize_t rc = read(fd, buf + done, count - done);
if (rc < 0) {
assert(errno == EIO);
return errno;
return - errno;
}
assert(rc != 0); /* We should never hit the end of the file. */
done += rc;