[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 7/7] block: rename "read-only" to BDRV_OPT_READ_O
From: |
Alberto Garcia |
Subject: |
[Qemu-block] [PATCH v2 7/7] block: rename "read-only" to BDRV_OPT_READ_ONLY |
Date: |
Thu, 15 Sep 2016 17:53:05 +0300 |
There were a few instances left. After this patch we're using the
macro in all places.
Signed-off-by: Alberto Garcia <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
---
blockdev.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index c3f8da4..fb207cd 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -807,7 +807,7 @@ QemuOptsList qemu_legacy_drive_opts = {
/* Options that are passed on, but have special semantics with -drive
*/
{
- .name = "read-only",
+ .name = BDRV_OPT_READ_ONLY,
.type = QEMU_OPT_BOOL,
.help = "open drive file as read-only",
},{
@@ -873,7 +873,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType
block_default_type)
{ "group", "throttling.group" },
- { "readonly", "read-only" },
+ { "readonly", BDRV_OPT_READ_ONLY },
};
for (i = 0; i < ARRAY_SIZE(opt_renames); i++) {
@@ -945,7 +945,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType
block_default_type)
}
/* copy-on-read is disabled with a warning for read-only devices */
- read_only |= qemu_opt_get_bool(legacy_opts, "read-only", false);
+ read_only |= qemu_opt_get_bool(legacy_opts, BDRV_OPT_READ_ONLY, false);
copy_on_read = qemu_opt_get_bool(legacy_opts, "copy-on-read", false);
if (read_only && copy_on_read) {
@@ -953,7 +953,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType
block_default_type)
copy_on_read = false;
}
- qdict_put(bs_opts, "read-only",
+ qdict_put(bs_opts, BDRV_OPT_READ_ONLY,
qstring_from_str(read_only ? "on" : "off"));
qdict_put(bs_opts, "copy-on-read",
qstring_from_str(copy_on_read ? "on" :"off"));
@@ -4042,7 +4042,7 @@ QemuOptsList qemu_common_drive_opts = {
.type = QEMU_OPT_STRING,
.help = "write error action",
},{
- .name = "read-only",
+ .name = BDRV_OPT_READ_ONLY,
.type = QEMU_OPT_BOOL,
.help = "open drive file as read-only",
},{
--
2.9.3
- [Qemu-block] [PATCH v2 0/7] Add "read-only" to the options QDict, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 7/7] block: rename "read-only" to BDRV_OPT_READ_ONLY,
Alberto Garcia <=
- [Qemu-block] [PATCH v2 5/7] block: Don't queue the same BDS twice in bdrv_reopen_queue_child(), Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 1/7] block: Remove bdrv_is_snapshot, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 4/7] block: Add "read-only" to the options QDict, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 6/7] commit: Add 'base' to the reopen queue before 'overlay_bs', Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 2/7] block: Set BDRV_O_ALLOW_RDWR and snapshot_options before storing the flags, Alberto Garcia, 2016/09/15
- [Qemu-block] [PATCH v2 3/7] block: Update bs->open_flags earlier in bdrv_open_common(), Alberto Garcia, 2016/09/15
- Re: [Qemu-block] [PATCH v2 0/7] Add "read-only" to the options QDict, Kevin Wolf, 2016/09/16