On Thu, 2017-11-16 at 11:30 +0100, Pavel Hrdina wrote:
> > @@ -4096,13 +4109,6 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr 
> > dev,
> >          }
> >      }
> >  
> > -    /* set the default console type for S390 arches */
> > -    if (dev->type == VIR_DOMAIN_DEVICE_CHR &&
> > -        dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
> > -        dev->data.chr->targetType == 
> > VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE &&
> > -        ARCH_IS_S390(def->os.arch))
> > -        dev->data.chr->targetType = 
> > VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO;
> > -
> 
> You've missed the following condition that clears auto generated unix
> socket path, it is also for char devices.

Right. I was focusing on the target type, but the stuff you mention
should definitely go in qemuDomainChrDefPostParse() too.

> > @@ -4154,6 +4160,11 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr 
> > dev,
> >          qemuDomainShmemDefPostParse(dev->data.shmem) < 0)
> >          goto cleanup;
> >  
> > +    if (dev->type == VIR_DOMAIN_DEVICE_CHR &&
> > +        qemuDomainChrDefPostParse(dev->data.chr, def) < 0) {
> > +        goto cleanup;
> > +    }
> > +
> 
> Is there any specific reason why did you move it to a different place?

All the ad-hoc code is before the sub-functions, and it looks nicer
to have the sub-functions all together. There should be no functional
impact with moving it.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to