[PATCH] qemu: Fix JSON migrate_set_downtime command

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

 



---
 src/qemu/qemu_monitor_json.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e8609aa..8a586bc 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1481,17 +1481,12 @@ int qemuMonitorJSONSetMigrationDowntime(qemuMonitorPtr mon,
                                         unsigned long long downtime)
 {
     int ret;
-    char *downtimestr;
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;
-    if (virAsprintf(&downtimestr, "%llums", downtime) < 0) {
-        virReportOOMError();
-        return -1;
-    }
+
     cmd = qemuMonitorJSONMakeCommand("migrate_set_downtime",
-                                     "s:value", downtimestr,
+                                     "d:value", downtime / 1000.0,
                                      NULL);
-    VIR_FREE(downtimestr);
     if (!cmd)
         return -1;
 
-- 
1.7.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]