diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-04-17 13:16:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-04-22 12:00:20 +0200 |
commit | 98522f63f40adaebc412481e1d2e9170160d4539 (patch) | |
tree | 025ec57320b8fbec0eab0078506e41154833c111 /qemu-img.c | |
parent | 5ff679b47d151c4f73be297f96606eaefb6cc4c4 (diff) |
block: Add errp to bdrv_new()
This patch adds an errp parameter to bdrv_new() and updates all its
callers. The next patches will make use of this in order to check for
duplicate IDs. Most of the callers know that their ID is fine, so they
can simply assert that there is no error.
Behaviour doesn't change with this patch yet as bdrv_new() doesn't
actually assign errors to errp.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qemu-img.c b/qemu-img.c index 8455994c65..3e8bd800ff 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -274,7 +274,7 @@ static BlockDriverState *bdrv_new_open(const char *filename, Error *local_err = NULL; int ret; - bs = bdrv_new("image"); + bs = bdrv_new("image", &error_abort); if (fmt) { drv = bdrv_find_format(fmt); @@ -2344,7 +2344,7 @@ static int img_rebase(int argc, char **argv) } else { char backing_name[1024]; - bs_old_backing = bdrv_new("old_backing"); + bs_old_backing = bdrv_new("old_backing", &error_abort); bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name)); ret = bdrv_open(&bs_old_backing, backing_name, NULL, NULL, BDRV_O_FLAGS, old_backing_drv, &local_err); @@ -2355,7 +2355,7 @@ static int img_rebase(int argc, char **argv) goto out; } if (out_baseimg[0]) { - bs_new_backing = bdrv_new("new_backing"); + bs_new_backing = bdrv_new("new_backing", &error_abort); ret = bdrv_open(&bs_new_backing, out_baseimg, NULL, NULL, BDRV_O_FLAGS, new_backing_drv, &local_err); if (ret) { |