]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Extract the assigned pty device for QEmu channels
authorMatthew Booth <mbooth@redhat.com>
Mon, 14 Dec 2009 09:42:14 +0000 (10:42 +0100)
committerDaniel Veillard <veillard@redhat.com>
Mon, 14 Dec 2009 09:42:14 +0000 (10:42 +0100)
* src/qemu/qemu_driver.c: Parse pty devices for channels

src/qemu/qemu_driver.c

index 20fb8c5967770573da90a7b14b91dd8aad1ae2a6..c5aa2db4fe8ff325268f080f647b4811907992a8 100644 (file)
@@ -1439,6 +1439,16 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
         }
     }
 
+    /* then the channel devices */
+    for (i = 0 ; i < vm->def->nchannels ; i++) {
+        virDomainChrDefPtr chr = vm->def->channels[i];
+        if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
+            if ((ret = qemudExtractTTYPath(conn, output, &offset,
+                                           &chr->data.file.path)) != 0)
+                return ret;
+        }
+    }
+
     return 0;
 }