summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-11-30 10:52:04 -0200
committerKevin Wolf <kwolf@redhat.com>2012-12-11 11:05:10 +0100
commit71c79813d83b5b45ba934cf995436063da458f66 (patch)
tree65aa148ff433e1f7f122e451ef2f034aebce311d /blockdev.c
parent3c42ea66888f149d72d600bab63624b2d849e4bf (diff)
downloadqemu-71c79813d83b5b45ba934cf995436063da458f66.tar.gz
qemu-71c79813d83b5b45ba934cf995436063da458f66.tar.bz2
qemu-71c79813d83b5b45ba934cf995436063da458f66.zip
block: bdrv_img_create(): add Error ** argument
This commit adds an Error ** argument to bdrv_img_create() and set it appropriately on error. Callers of bdrv_img_create() pass NULL for the new argument and still rely on bdrv_img_create()'s return value. Next commits will change callers to use the Error object instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c
index 4a4d99f223..500f09116a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -789,7 +789,7 @@ void qmp_transaction(BlockdevActionList *dev_list, Error **errp)
ret = bdrv_img_create(new_image_file, format,
states->old_bs->filename,
states->old_bs->drv->format_name,
- NULL, -1, flags);
+ NULL, -1, flags, NULL);
if (ret) {
error_set(errp, QERR_OPEN_FILE_FAILED, new_image_file);
goto delete_and_fail;
@@ -1264,7 +1264,7 @@ void qmp_drive_mirror(const char *device, const char *target,
bdrv_get_geometry(bs, &size);
size *= 512;
ret = bdrv_img_create(target, format,
- NULL, NULL, NULL, size, flags);
+ NULL, NULL, NULL, size, flags, NULL);
} else {
switch (mode) {
case NEW_IMAGE_MODE_EXISTING:
@@ -1275,7 +1275,7 @@ void qmp_drive_mirror(const char *device, const char *target,
ret = bdrv_img_create(target, format,
source->filename,
source->drv->format_name,
- NULL, -1, flags);
+ NULL, -1, flags, NULL);
break;
default:
abort();