summaryrefslogtreecommitdiff
path: root/block/blkverify.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-09-05 14:45:29 +0200
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:48 +0200
commit34b5d2c68eb4082c288e70fb99c61af8f7b96fde (patch)
tree7c4c1e4e248a8e044dd891b0e54de1fcc03d7434 /block/blkverify.c
parentd5124c00d80b4d948509f2c7f6b54228d9981f75 (diff)
downloadqemu-34b5d2c68eb4082c288e70fb99c61af8f7b96fde.tar.gz
block: Error parameter for open functions
Add an Error ** parameter to bdrv_open, bdrv_file_open and associated functions to allow more specific error messages. Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/blkverify.c')
-rw-r--r--block/blkverify.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blkverify.c b/block/blkverify.c
index 2093391c8b..bff95d2a45 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -141,8 +141,10 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags,
goto fail;
}
- ret = bdrv_file_open(&bs->file, raw, NULL, flags);
+ ret = bdrv_file_open(&bs->file, raw, NULL, flags, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
goto fail;
}
@@ -154,8 +156,10 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags,
}
s->test_file = bdrv_new("");
- ret = bdrv_open(s->test_file, filename, NULL, flags, NULL);
+ ret = bdrv_open(s->test_file, filename, NULL, flags, NULL, &local_err);
if (ret < 0) {
+ qerror_report_err(local_err);
+ error_free(local_err);
bdrv_unref(s->test_file);
s->test_file = NULL;
goto fail;