diff --git a/qemu-img.c b/qemu-img.c index b506839ef083aaaa2c01820f9cdb8ad9e57881d4..60f1784f1192adc7a767928b03fd9cdc8a21e42a 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -296,7 +296,7 @@ static BlockBackend *img_open_opts(const char *optstr, error_report("--force-share/-U conflicts with image 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) { @@ -326,7 +326,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) { @@ -3156,8 +3156,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, diff --git a/qemu-io.c b/qemu-io.c index 34fa8a10a43204b6ad14696bf036a8dd32a79dca..8e38b288b7bbcbd3c5ae8326d587204a3b039ba3 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -76,7 +76,7 @@ static int openfile(char *name, int flags, bool writethrough, bool force_share, QDECREF(opts); return 1; } - qdict_put(opts, BDRV_OPT_FORCE_SHARE, qbool_from_bool(true)); + qdict_put_bool(opts, BDRV_OPT_FORCE_SHARE, true); } qemuio_blk = blk_new_open(name, NULL, opts, flags, &local_err); if (!qemuio_blk) {