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/iscsi.c | |
parent | 8023090be592514dea4975428543edd598c65fc3 (diff) |
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/iscsi.c')
-rw-r--r-- | block/iscsi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 813abd8fef..5f26e7379c 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1046,7 +1046,8 @@ static QemuOptsList runtime_opts = { * We support iscsi url's on the form * iscsi://[<username>%<password>@]<host>[:<port>]/<targetname>/<lun> */ -static int iscsi_open(BlockDriverState *bs, QDict *options, int flags) +static int iscsi_open(BlockDriverState *bs, QDict *options, int flags, + Error **errp) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = NULL; @@ -1260,7 +1261,7 @@ static int iscsi_create(const char *filename, QEMUOptionParameter *options) bs_options = qdict_new(); qdict_put(bs_options, "filename", qstring_from_str(filename)); - ret = iscsi_open(bs, bs_options, 0); + ret = iscsi_open(bs, bs_options, 0, NULL); QDECREF(bs_options); if (ret != 0) { |