summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMax Reitz2015-02-05 19:58:12 +0100
committerStefan Hajnoczi2015-02-16 16:07:18 +0100
commitb65a5e12a4136b20f9d06675d597b52d64ac903c (patch)
tree1862586786ade94a6852bdd63ea1cfbb8d164037 /block
parentblock: Add blk_new_open() (diff)
downloadqemu-b65a5e12a4136b20f9d06675d597b52d64ac903c.tar.gz
qemu-b65a5e12a4136b20f9d06675d597b52d64ac903c.tar.xz
qemu-b65a5e12a4136b20f9d06675d597b52d64ac903c.zip
block: Add Error parameter to bdrv_find_protocol()
The argument given to bdrv_find_protocol() is just a file name, which makes it difficult for the caller to reconstruct what protocol bdrv_find_protocol() was hoping to find. This patch adds an Error parameter to that function to solve this issue. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1423162705-32065-4-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/sheepdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index be3176fcb4..e9b0ca1487 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1730,7 +1730,7 @@ static int sd_create(const char *filename, QemuOpts *opts,
BlockDriver *drv;
/* Currently, only Sheepdog backing image is supported. */
- drv = bdrv_find_protocol(backing_file, true);
+ drv = bdrv_find_protocol(backing_file, true, NULL);
if (!drv || strcmp(drv->protocol_name, "sheepdog") != 0) {
error_setg(errp, "backing_file must be a sheepdog image");
ret = -EINVAL;