summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block-raw-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 85ca704946..af3d468750 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -234,7 +234,7 @@ static int raw_pread_aligned(BlockDriverState *bs, int64_t offset,
label__raw_read__success:
- return ret;
+ return (ret < 0) ? -errno : ret;
}
/*