aboutsummaryrefslogtreecommitdiff
path: root/include/block/block.h
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2014-06-23 23:28:23 +0800
committerKevin Wolf <kwolf@redhat.com>2014-06-27 20:00:00 +0200
commit6b8aeca574a15668c47296d8e0c4f96c72e63c36 (patch)
tree276eb681dd5e5649ea49a37f35ad6116d6bfd1ad /include/block/block.h
parentd88964aeda6cfc44585fe35c97c37537235c0a96 (diff)
block.c: Don't return success for bdrv_append_temp_snapshot() failure
When failure occurs, 'ret' need be set, or may return 0 to indicate success. Previously, an error was set in errp, but 0 was returned anyway. So let bdrv_append_temp_snapshot() return an error code and use that for the bdrv_open() return value. Also, error_propagate() need be called only one time within a function. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index b53833d1d6..7e92f549fb 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -214,7 +214,7 @@ int bdrv_open_image(BlockDriverState **pbs, const char *filename,
bool allow_none, Error **errp);
void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd);
int bdrv_open_backing_file(BlockDriverState *bs, QDict *options, Error **errp);
-void bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp);
+int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp);
int bdrv_open(BlockDriverState **pbs, const char *filename,
const char *reference, QDict *options, int flags,
BlockDriver *drv, Error **errp);