]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Scrape stdout for virtio console pty
authorCole Robinson <crobinso@redhat.com>
Wed, 8 Jun 2011 16:27:18 +0000 (12:27 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 14 Jun 2011 14:41:19 +0000 (10:41 -0400)
Currently we forget to do this and have to fallback to info chardev (which
also fails, see following patch)

src/qemu/qemu_process.c

index 887e31b3f70749f5358fa1b3c80be1127a4be2b3..3aa436ebfd67f6d28ae56e9150970736ed8d3c7f 100644 (file)
@@ -989,6 +989,16 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm,
         }
     }
 
+    if (vm->def->console) {
+        virDomainChrDefPtr chr = vm->def->console;
+        if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY &&
+            chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
+            if ((ret = qemuProcessExtractTTYPath(output, &offset,
+                                                 &chr->source.data.file.path)) != 0)
+                return ret;
+        }
+    }
+
     return 0;
 }