mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
afd3216027
commit
94c6d6d815
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue