diff options
author | Max Reitz <mreitz@redhat.com> | 2013-09-05 14:22:29 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-12 10:12:47 +0200 |
commit | 015a1036a74ad29bb6916754911ce25587ff4db3 (patch) | |
tree | 46dacfeda73bb70c5a4e003619c3604355db1b8f /block/qcow2.c | |
parent | 8023090be592514dea4975428543edd598c65fc3 (diff) | |
download | qemu-015a1036a74ad29bb6916754911ce25587ff4db3.tar.gz qemu-015a1036a74ad29bb6916754911ce25587ff4db3.tar.bz2 qemu-015a1036a74ad29bb6916754911ce25587ff4db3.zip |
bdrv: Use "Error" for opening images
Add an Error ** parameter to BlockDriver.bdrv_open and
BlockDriver.bdrv_file_open to allow more specific error messages.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 7c9354cadf..eda085cfd8 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -350,7 +350,8 @@ static QemuOptsList qcow2_runtime_opts = { }, }; -static int qcow2_open(BlockDriverState *bs, QDict *options, int flags) +static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, + Error **errp) { BDRVQcowState *s = bs->opaque; int len, i, ret = 0; @@ -1060,7 +1061,7 @@ static void qcow2_invalidate_cache(BlockDriverState *bs) qbool_from_int(s->use_lazy_refcounts)); memset(s, 0, sizeof(BDRVQcowState)); - qcow2_open(bs, options, flags); + qcow2_open(bs, options, flags, NULL); QDECREF(options); |