aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 5aef8ef047..0ad698d7f1 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -298,7 +298,7 @@ static BlockBackend *img_open_opts(const char *optstr,
QDECREF(options);
return NULL;
}
- qdict_put(options, BDRV_OPT_FORCE_SHARE, qbool_from_bool(true));
+ qdict_put_bool(options, BDRV_OPT_FORCE_SHARE, true);
}
blk = blk_new_open(NULL, NULL, options, flags, &local_err);
if (!blk) {
@@ -331,7 +331,7 @@ static BlockBackend *img_open_file(const char *filename,
}
if (force_share) {
- qdict_put(options, BDRV_OPT_FORCE_SHARE, qbool_from_bool(true));
+ qdict_put_bool(options, BDRV_OPT_FORCE_SHARE, true);
}
blk = blk_new_open(filename, NULL, options, flags, &local_err);
if (!blk) {
@@ -3219,8 +3219,7 @@ static int img_rebase(int argc, char **argv)
if (!options) {
options = qdict_new();
}
- qdict_put(options, BDRV_OPT_FORCE_SHARE,
- qbool_from_bool(true));
+ qdict_put_bool(options, BDRV_OPT_FORCE_SHARE, true);
}
bdrv_get_backing_filename(bs, backing_name, sizeof(backing_name));
blk_old_backing = blk_new_open(backing_name, NULL,