summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-08-26 19:47:49 +0200
committerKevin Wolf <kwolf@redhat.com>2015-09-14 16:51:36 +0200
commit6ebf9aa2ef7f3e094d91ea27140dc6e73774386a (patch)
treef4e0b864d52ad4662abed1f60be2ca1990a44c6e /block
parente6641719fed794be8e0c48a69761528ae6c95ed9 (diff)
block: Drop drv parameter from bdrv_open()
Now that this parameter is effectively unused, we can drop it and just pass NULL on to bdrv_open_inherit(). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/block-backend.c2
-rw-r--r--block/parallels.c2
-rw-r--r--block/qcow.c2
-rw-r--r--block/qcow2.c6
-rw-r--r--block/qed.c2
-rw-r--r--block/sheepdog.c5
-rw-r--r--block/vdi.c2
-rw-r--r--block/vhdx.c2
-rw-r--r--block/vmdk.c7
-rw-r--r--block/vpc.c2
-rw-r--r--block/vvfat.c2
11 files changed, 16 insertions, 18 deletions
diff --git a/block/block-backend.c b/block/block-backend.c
index aee8a12023..c2e873292a 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -126,7 +126,7 @@ BlockBackend *blk_new_open(const char *name, const char *filename,
return NULL;
}
- ret = bdrv_open(&blk->bs, filename, reference, options, flags, NULL, errp);
+ ret = bdrv_open(&blk->bs, filename, reference, options, flags, errp);
if (ret < 0) {
blk_unref(blk);
return NULL;
diff --git a/block/parallels.c b/block/parallels.c
index 046b56844c..5cd6ec3349 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -476,7 +476,7 @@ static int parallels_create(const char *filename, QemuOpts *opts, Error **errp)
file = NULL;
ret = bdrv_open(&file, filename, NULL, NULL,
- BDRV_O_RDWR | BDRV_O_PROTOCOL, NULL, &local_err);
+ BDRV_O_RDWR | BDRV_O_PROTOCOL, &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
return ret;
diff --git a/block/qcow.c b/block/qcow.c
index 01fba54cef..6e35db1df8 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -793,7 +793,7 @@ static int qcow_create(const char *filename, QemuOpts *opts, Error **errp)
qcow_bs = NULL;
ret = bdrv_open(&qcow_bs, filename, NULL, NULL,
- BDRV_O_RDWR | BDRV_O_PROTOCOL, NULL, &local_err);
+ BDRV_O_RDWR | BDRV_O_PROTOCOL, &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto cleanup;
diff --git a/block/qcow2.c b/block/qcow2.c
index 867b43ba84..a707d8d33f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1975,7 +1975,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
bs = NULL;
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
return ret;
@@ -2038,7 +2038,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
qdict_put(options, "driver", qstring_from_str("qcow2"));
ret = bdrv_open(&bs, filename, NULL, options,
BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto out;
@@ -2092,7 +2092,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
qdict_put(options, "driver", qstring_from_str("qcow2"));
ret = bdrv_open(&bs, filename, NULL, options,
BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_BACKING,
- NULL, &local_err);
+ &local_err);
if (local_err) {
error_propagate(errp, local_err);
goto out;
diff --git a/block/qed.c b/block/qed.c
index 954ed007c0..a7ff1d9c41 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -583,7 +583,7 @@ static int qed_create(const char *filename, uint32_t cluster_size,
bs = NULL;
ret = bdrv_open(&bs, filename, NULL, NULL,
- BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_PROTOCOL, NULL,
+ BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_PROTOCOL,
&local_err);
if (ret < 0) {
error_propagate(errp, local_err);
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 9585beb73e..67ca788d5c 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1554,7 +1554,7 @@ static int sd_prealloc(const char *filename, Error **errp)
int ret;
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, errp);
+ errp);
if (ret < 0) {
goto out_with_err_set;
}
@@ -1746,8 +1746,7 @@ static int sd_create(const char *filename, QemuOpts *opts,
}
bs = NULL;
- ret = bdrv_open(&bs, backing_file, NULL, NULL, BDRV_O_PROTOCOL, NULL,
- errp);
+ ret = bdrv_open(&bs, backing_file, NULL, NULL, BDRV_O_PROTOCOL, errp);
if (ret < 0) {
goto out;
}
diff --git a/block/vdi.c b/block/vdi.c
index 7642ef3597..062a6541f8 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -764,7 +764,7 @@ static int vdi_create(const char *filename, QemuOpts *opts, Error **errp)
goto exit;
}
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto exit;
diff --git a/block/vhdx.c b/block/vhdx.c
index f05c7a9de3..d3bb1bd9d0 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -1842,7 +1842,7 @@ static int vhdx_create(const char *filename, QemuOpts *opts, Error **errp)
bs = NULL;
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto exit;
diff --git a/block/vmdk.c b/block/vmdk.c
index fbaab67c8f..7bdc3d0f3d 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1632,7 +1632,7 @@ static int vmdk_create_extent(const char *filename, int64_t filesize,
assert(bs == NULL);
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto exit;
@@ -1905,8 +1905,7 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
ret = -ENOENT;
goto exit;
}
- ret = bdrv_open(&bs, full_backing, NULL, NULL, BDRV_O_NO_BACKING, NULL,
- errp);
+ ret = bdrv_open(&bs, full_backing, NULL, NULL, BDRV_O_NO_BACKING, errp);
g_free(full_backing);
if (ret != 0) {
goto exit;
@@ -1977,7 +1976,7 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
}
assert(new_bs == NULL);
ret = bdrv_open(&new_bs, filename, NULL, NULL,
- BDRV_O_RDWR | BDRV_O_PROTOCOL, NULL, &local_err);
+ BDRV_O_RDWR | BDRV_O_PROTOCOL, &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto exit;
diff --git a/block/vpc.c b/block/vpc.c
index 3e385d9fb9..2b3b518d1c 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -794,7 +794,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
goto out;
}
ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_RDWR | BDRV_O_PROTOCOL,
- NULL, &local_err);
+ &local_err);
if (ret < 0) {
error_propagate(errp, local_err);
goto out;
diff --git a/block/vvfat.c b/block/vvfat.c
index bffe8add82..7ddc962436 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2962,7 +2962,7 @@ static int enable_write_target(BDRVVVFATState *s, Error **errp)
qdict_put(options, "driver", qstring_from_str("qcow"));
ret = bdrv_open(&s->qcow, s->qcow_filename, NULL, options,
BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH,
- NULL, errp);
+ errp);
if (ret < 0) {
goto err;
}