diff --git a/block/raw-posix.c b/block/raw-posix.c index 86e3067762..57da1df649 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -249,7 +249,7 @@ static int raw_pread_aligned(BlockDriverState *bs, int64_t offset, label__raw_read__success: - return ret; + return (ret < 0) ? -errno : ret; } /*