summaryrefslogtreecommitdiffstats
path: root/qemu-io.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-02-18 18:33:06 +0100
committerKevin Wolf <kwolf@redhat.com>2014-02-21 21:02:22 +0100
commitddf5636dc9e4be894f2ab4a5f803d915478b5099 (patch)
tree4d5249e6d060518a471a244c02b90cac46ea4d85 /qemu-io.c
parentf67503e5bd8997ea7ec3f4bfa0af0e06321771a6 (diff)
downloadhqemu-ddf5636dc9e4be894f2ab4a5f803d915478b5099.zip
hqemu-ddf5636dc9e4be894f2ab4a5f803d915478b5099.tar.gz
block: Add reference parameter to bdrv_open()
Allow bdrv_open() to handle references to existing block devices just as bdrv_file_open() is already capable of. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 8da8f6e..61d54c0 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -68,7 +68,9 @@ static int openfile(char *name, int flags, int growable, QDict *opts)
} else {
qemuio_bs = bdrv_new("hda");
- if (bdrv_open(&qemuio_bs, name, opts, flags, NULL, &local_err) < 0) {
+ if (bdrv_open(&qemuio_bs, name, NULL, opts, flags, NULL, &local_err)
+ < 0)
+ {
fprintf(stderr, "%s: can't open device %s: %s\n", progname, name,
error_get_pretty(local_err));
error_free(local_err);
OpenPOWER on IntegriCloud