summaryrefslogtreecommitdiff
path: root/block/raw_bsd.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-09-06 17:14:26 +0200
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:48 +0200
commitcc84d90ff54c025190dbe49ec5fea1268217c5f2 (patch)
tree44541b52ece4f55b5678087f83f3eb6cd91774aa /block/raw_bsd.c
parent34b5d2c68eb4082c288e70fb99c61af8f7b96fde (diff)
downloadqemu-cc84d90ff54c025190dbe49ec5fea1268217c5f2.tar.gz
qemu-cc84d90ff54c025190dbe49ec5fea1268217c5f2.tar.bz2
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/raw_bsd.c')
-rw-r--r--block/raw_bsd.c10
1 files changed, 9 insertions, 1 deletions
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,