Skip to content
Snippets Groups Projects
Commit 94c6d6d8 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Anthony Liguori
Browse files

fix raw_pread_aligned return value


raw_pread_aligned currently returns the raw return value from
lseek/read, which is always -1 in case of an error.  But the
callers higher up the stack expect it to return the negated
errno just like raw_pwrite_aligned.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent afd32160
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment