[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/15] fix raw_pread_aligned return value
From: |
Glauber Costa |
Subject: |
[Qemu-devel] [PATCH 07/15] fix raw_pread_aligned return value |
Date: |
Wed, 17 Jun 2009 13:09:56 -0400 |
From: Christoph Hellwig <address@hidden>
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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Glauber Costa <address@hidden>
---
block-raw-posix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 85ca704..af3d468 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;
}
/*
--
1.6.2.2
- [Qemu-devel] [GIT PULL 00/15] Stable branch update 2009-06-17, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 01/15] net: Fix -net socket, listen (Jan Kiszka), Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 02/15] Minimal ethernet frame length is 64 bytes., Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 03/15] Don't send all gratuitous packets at once., Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 04/15] serial: fix lost character after sysrq, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 05/15] e1000: Ignore reset command, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 06/15] VNC: Fix memory allocation (wrong structure size)., Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 07/15] fix raw_pread_aligned return value,
Glauber Costa <=
- [Qemu-devel] [PATCH 08/15] BACKPORT: Register reset functions for e1000 and rtl8139, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 09/15] BACKPORT: Update irqs on reset and device load, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 10/15] BACKPORT: Add rtc reset function., Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 11/15] fix qemu_aio_flush, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 12/15] QEMU KVM: i386: Fix the cpu reset state, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 13/15] kvm: Fix IRQ injection into full queue, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 14/15] Prevent CD-ROM media eject while device is locked, Glauber Costa, 2009/06/17
- [Qemu-devel] [PATCH 15/15] Fix vga_screen_dump_blank() PPM generation, Glauber Costa, 2009/06/17
- [Qemu-devel] Re: [PATCH 09/15] BACKPORT: Update irqs on reset and device load, Blue Swirl, 2009/06/17
- [Qemu-devel] Re: [PATCH 09/15] BACKPORT: Update irqs on reset and device load, Glauber Costa, 2009/06/17