]> xenbits.xensource.com Git - libvirt.git/commitdiff
Support all backend serial devices for pSeries guest
authorLi Zhang <zhlcindy@linux.vnet.ibm.com>
Thu, 20 Dec 2012 06:02:25 +0000 (14:02 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 20 Dec 2012 23:19:49 +0000 (16:19 -0700)
Currently, it only considers PTY backend serial devices for pseries.
It need to support all kinds of serial devices.

This patch is to fix the problem which is that it doesn't work
when specifying source type as file.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
src/qemu/qemu_command.c

index ef16d274a5c238e85012a53b8c4a1204357c48db..199eb6d1eac28281fdb94d7dacc5ca1c33e77ee5 100644 (file)
@@ -923,7 +923,6 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
 
     for (i = 0 ; i < def->nserials; i++) {
         if (def->serials[i]->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
-            def->serials[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY &&
             (def->os.arch == VIR_ARCH_PPC64) &&
             STREQ(def->os.machine, "pseries"))
             def->serials[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
@@ -6970,7 +6969,6 @@ qemuBuildChrDeviceStr(virDomainChrDefPtr serial,
 
     if ((arch == VIR_ARCH_PPC64) && STREQ(machine, "pseries")) {
         if (serial->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
-            serial->source.type == VIR_DOMAIN_CHR_TYPE_PTY &&
             serial->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
             virBufferAsprintf(&cmd, "spapr-vty,chardev=char%s",
                               serial->info.alias);