diff options
author | Max Reitz <mreitz@redhat.com> | 2014-02-18 18:33:06 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-02-21 21:02:22 +0100 |
commit | ddf5636dc9e4be894f2ab4a5f803d915478b5099 (patch) | |
tree | 4d5249e6d060518a471a244c02b90cac46ea4d85 /block/qcow2.c | |
parent | f67503e5bd8997ea7ec3f4bfa0af0e06321771a6 (diff) |
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 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 309ea12b7d..e2aa5c1b3c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1553,7 +1553,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, */ BlockDriver* drv = bdrv_find_format("qcow2"); assert(drv != NULL); - ret = bdrv_open(&bs, filename, NULL, + ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, drv, &local_err); if (ret < 0) { error_propagate(errp, local_err); @@ -1604,7 +1604,7 @@ static int qcow2_create2(const char *filename, int64_t total_size, bs = NULL; /* Reopen the image without BDRV_O_NO_FLUSH to flush it before returning */ - ret = bdrv_open(&bs, filename, NULL, + ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_BACKING, drv, &local_err); if (local_err) { |