aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/cow.c4
-rw-r--r--block/qcow.c4
-rw-r--r--block/qcow2.c2
-rw-r--r--block/qed.c4
-rw-r--r--block/raw_bsd.c10
-rw-r--r--block/vvfat.c4
6 files changed, 22 insertions, 6 deletions
diff --git a/block/cow.c b/block/cow.c
index 3a93ed9966..909c3e7182 100644
--- a/block/cow.c
+++ b/block/cow.c
@@ -316,8 +316,10 @@ static int cow_create(const char *filename, QEMUOptionParameter *options,
options++;
}
- ret = bdrv_create_file(filename, options);
+ ret = bdrv_create_file(filename, options, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
return ret;
}
diff --git a/block/qcow.c b/block/qcow.c
index 396636f7b4..c470e05f60 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -684,8 +684,10 @@ static int qcow_create(const char *filename, QEMUOptionParameter *options,
options++;
}
- ret = bdrv_create_file(filename, options);
+ ret = bdrv_create_file(filename, options, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
return ret;
}
diff --git a/block/qcow2.c b/block/qcow2.c
index dabfe8d08b..b257347c3a 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1365,7 +1365,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
uint8_t* refcount_table;
int ret;
- ret = bdrv_create_file(filename, options);
+ ret = bdrv_create_file(filename, options, NULL);
if (ret < 0) {
return ret;
}
diff --git a/block/qed.c b/block/qed.c
index f17094cb92..6c0cba04f3 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -555,8 +555,10 @@ static int qed_create(const char *filename, uint32_t cluster_size,
int ret = 0;
BlockDriverState *bs = NULL;
- ret = bdrv_create_file(filename, NULL);
+ ret = bdrv_create_file(filename, NULL, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
return ret;
}
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index 7d75ad282f..d4ace6020b 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -133,7 +133,15 @@ static int raw_has_zero_init(BlockDriverState *bs)
static int raw_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
- return bdrv_create_file(filename, options);
+ Error *local_err = NULL;
+ int ret;
+
+ ret = bdrv_create_file(filename, options, &local_err);
+ if (error_is_set(&local_err)) {
+ qerror_report_err(local_err);
+ error_free(local_err);
+ }
+ return ret;
}
static int raw_open(BlockDriverState *bs, QDict *options, int flags,
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;
}