diff options
author | Max Reitz <mreitz@redhat.com> | 2013-10-10 15:44:03 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:50:00 +0200 |
commit | 10ffa72faed7e02805d7911d58d429efe6f95f93 (patch) | |
tree | 4adae8de3226e7b299a5e69e71d0fc44f3c3a51a /block/blkdebug.c | |
parent | c6252b7cea0dfa893cf1f49de3a58f222e910783 (diff) |
blkdebug: Employ error parameter
Make use of the error parameter in blkdebug_open.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/blkdebug.c')
-rw-r--r-- | block/blkdebug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c index be948b2fdd..16d2b91ac9 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -362,8 +362,7 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, opts = qemu_opts_create_nofail(&runtime_opts); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { - qerror_report_err(local_err); - error_free(local_err); + error_propagate(errp, local_err); ret = -EINVAL; goto fail; } @@ -373,6 +372,7 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, if (config) { ret = read_config(s, config); if (ret < 0) { + error_setg_errno(errp, -ret, "Could not read blkdebug config file"); goto fail; } } @@ -383,14 +383,14 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, /* Open the backing file */ filename = qemu_opt_get(opts, "x-image"); if (filename == NULL) { + error_setg(errp, "Could not retrieve image file name"); ret = -EINVAL; goto fail; } ret = bdrv_file_open(&bs->file, filename, NULL, flags, &local_err); if (ret < 0) { - qerror_report_err(local_err); - error_free(local_err); + error_propagate(errp, local_err); goto fail; } |