summaryrefslogtreecommitdiffstats
path: root/block/vvfat.c
diff options
context:
space:
mode:
authorMax Reitz2013-09-06 17:14:26 +0200
committerKevin Wolf2013-09-12 10:12:48 +0200
commitcc84d90ff54c025190dbe49ec5fea1268217c5f2 (patch)
tree44541b52ece4f55b5678087f83f3eb6cd91774aa /block/vvfat.c
parentblock: Error parameter for open functions (diff)
downloadqemu-cc84d90ff54c025190dbe49ec5fea1268217c5f2.tar.gz
qemu-cc84d90ff54c025190dbe49ec5fea1268217c5f2.tar.xz
qemu-cc84d90ff54c025190dbe49ec5fea1268217c5f2.zip
block: Error parameter for create functions
Add an Error ** parameter to bdrv_create and its associated functions to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r--block/vvfat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index 788d0630fd..3ddaa0bcce 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2928,8 +2928,10 @@ static int enable_write_target(BDRVVVFATState *s)
set_option_parameter_int(options, BLOCK_OPT_SIZE, s->sector_count * 512);
set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
- ret = bdrv_create(bdrv_qcow, s->qcow_filename, options);
+ ret = bdrv_create(bdrv_qcow, s->qcow_filename, options, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
goto err;
}