]> xenbits.xensource.com Git - libvirt.git/commitdiff
Use \r instead of \n for QEMU monitor
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 14 Aug 2007 00:15:16 +0000 (00:15 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 14 Aug 2007 00:15:16 +0000 (00:15 +0000)
ChangeLog
src/qemu_driver.c

index 4f4162280559dfaa93ae5f4292cb9cc698e858de..f27bb647334f272a28e4a4d39c9c3f63a1c71349 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Aug 13 20:13:48 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/qemu_driver.c: Use \r instead of \n for monitor commands to
+       avoid bug where QEMU \n gets translated to \r\n,then causing QEMU
+       to process the command twice. Patch from Jim Paris.
+
 Mon Aug 13 11:55:48 CEST 2007 Daniel Veillard <veillard@redhat.com>
 
        * src/qemu_driver.c: patch from Jim Paris removing memory leak
index b05c3f66d9523c3255bcf3519aab7d8d05d47442..e13e6a3a0eb9a9d8686bc6201c8a08eb5628b9d6 100644 (file)
@@ -1755,7 +1755,7 @@ static int qemudDomainSuspend(virDomainPtr dom) {
     if (vm->state == VIR_DOMAIN_PAUSED)
         return 0;
 
-    if (qemudMonitorCommand(driver, vm, "stop\n", &info) < 0) {
+    if (qemudMonitorCommand(driver, vm, "stop\r", &info) < 0) {
         qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, "suspend operation failed");
         return -1;
     }
@@ -1780,7 +1780,7 @@ static int qemudDomainResume(virDomainPtr dom) {
     }
     if (vm->state == VIR_DOMAIN_RUNNING)
         return 0;
-    if (qemudMonitorCommand(driver, vm, "cont\n", &info) < 0) {
+    if (qemudMonitorCommand(driver, vm, "cont\r", &info) < 0) {
         qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, "resume operation failed");
         return -1;
     }