[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCHv4 15/18] blockjob: accommodate RHEL backport names


drive-mirror and drive-reopen are still under upstream qemu
discussion; as a result, RHEL decided to backport things under
a downstream name.  Accommodate this alternate spelling.  I
don't think it's worth trying to support both spellings at once:
if you build upstream libvirt on RHEL, you lose out on the
feature, but then you are also capable of building upstream qemu
for RHEL to reinstate the feature (that is, if you use RHEL, you
should either stick to the distro patches, or you are assumed to
be capable of building the entire virt stack yourself).

* src/qemu/qemu_monitor_json.c (qemuMonitorJSONCheckCommands):
Check for alternate spelling.
(int qemuMonitorJSONDriveMirror, qemuMonitorJSONDriveReopen): Use
that spelling.
 src/qemu/qemu_monitor_json.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 8475dab..27bed97 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -975,9 +975,9 @@ qemuMonitorJSONCheckCommands(qemuMonitorPtr mon,
             qemuCapsSet(qemuCaps, QEMU_CAPS_WAKEUP);
         else if (STREQ(name, "transaction"))
             qemuCapsSet(qemuCaps, QEMU_CAPS_TRANSACTION);
-        else if (STREQ(name, "drive-mirror"))
+        else if (STREQ(name, "__com.redhat_drive-mirror"))
             qemuCapsSet(qemuCaps, QEMU_CAPS_DRIVE_MIRROR);
-        else if (STREQ(name, "drive-reopen"))
+        else if (STREQ(name, "__com.redhat_drive-reopen"))
             qemuCapsSet(qemuCaps, QEMU_CAPS_DRIVE_REOPEN);

@@ -3203,7 +3203,7 @@ qemuMonitorJSONDriveMirror(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
     bool reuse = (flags & VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT) != 0;

     cmd = qemuMonitorJSONMakeCommandRaw(actions != NULL,
-                                        "drive-mirror",
+                                        "__com.redhat_drive-mirror",
                                         "s:device", device,
                                         "s:target", file,
                                         "b:full", !shallow,
@@ -3269,7 +3269,7 @@ qemuMonitorJSONDriveReopen(qemuMonitorPtr mon,  const char *device,
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;

-    cmd = qemuMonitorJSONMakeCommand("drive-reopen",
+    cmd = qemuMonitorJSONMakeCommand("__com.redhat_drive-reopen",
                                      "s:device", device,
                                      "s:new-image-file", file,
                                      format ? "s:format" : NULL, format,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]