[libvirt] [PATCH] Fix > 1 char device for qemu VM

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

 



Trying to start a qemu guest with more than 1 character
device (serial or parallel, doesn't count for console)
always times out. There was an error in the code that
would strip the pty path qemu spits out, which
confused the parsing after being called more than twice.

The attached patch fixes this. I verified that guests
with 0, 1, and 2 serial devices all boot fine.

Thanks,
Cole
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 9d8f75a..a1e7285 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -566,7 +566,7 @@ static int qemudExtractMonitorPath(virConnectPtr conn,
             strncpy(*path, dev, (tmp-dev));
             (*path)[(tmp-dev)] = '\0';
             /* ... now further update offset till we get EOL */
-            *offset += tmp - haystack;
+            *offset = tmp - haystack;
             return 0;
         }
         tmp++;
--
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]