diff options
author | Max Reitz <mreitz@redhat.com> | 2013-09-06 17:14:26 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-12 10:12:48 +0200 |
commit | cc84d90ff54c025190dbe49ec5fea1268217c5f2 (patch) | |
tree | 44541b52ece4f55b5678087f83f3eb6cd91774aa /block/raw_bsd.c | |
parent | 34b5d2c68eb4082c288e70fb99c61af8f7b96fde (diff) | |
download | qemu-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.c | 10 |
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, |