[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 13/43] block/raw-posix: Fix ret in raw_open_common(
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 13/43] block/raw-posix: Fix ret in raw_open_common() |
Date: |
Tue, 24 Feb 2015 15:47:48 -0600 |
From: Max Reitz <address@hidden>
The return value must be negative on error; there is one place in
raw_open_common() where errp is set, but ret remains 0. Fix it.
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 01212d4ed68fc8daa29062a9a38650cf8febe392)
Signed-off-by: Michael Roth <address@hidden>
---
block/raw-posix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index d8bbed0..ef21242 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -446,6 +446,7 @@ static int raw_open_common(BlockDriverState *bs, QDict
*options,
}
if (fstat(s->fd, &st) < 0) {
+ ret = -errno;
error_setg_errno(errp, errno, "Could not stat file");
goto fail;
}
--
1.9.1
- [Qemu-stable] Patch Round-up for stable 2.2.1, freeze on 2015-03-05, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 09/43] iotests: Add test for unsupported image creation, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 10/43] qcow2: Prevent numerical overflow, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 14/43] block migration: fix return value, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 13/43] block/raw-posix: Fix ret in raw_open_common(),
Michael Roth <=
- [Qemu-stable] [PATCH 11/43] qcow2: Flushing the caches in qcow2_close may fail, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 17/43] block: Don't probe for unknown backing file format, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 16/43] qcow2.py: Add required padding for header extensions, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 18/43] linuxboot: fix loading old kernels, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 12/43] qcow2: Respect bdrv_truncate() error, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 19/43] audio: Don't free hw resources until after hw backend is stopped, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 23/43] atomic: fix position of volatile qualifier, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 01/43] block: Make essential BlockDriver objects public, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 22/43] migration/block: fix pending() return value, Michael Roth, 2015/02/24
- [Qemu-stable] [PATCH 21/43] target-xtensa: test cross-page opcode, Michael Roth, 2015/02/24