On Thu, 2017-04-27 at 20:58 +0200, Pavel Hrdina wrote: > The issue with original code is that the if else-if else condition > is not consistent. > > The first if checks S390 and address type together, however the second > else-if checks only for PPC64, the capability checks are inside that block. > > So if arch is S390 but the address type is different from > VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE it continues to the last else block and > sets the model to piix3-uhci it it's available. > > The second else-if for PPC64 doesn't fallback to piix3-uhci it the > architecture is PPC64 but none of the capabilities from that block > are set. > > This patch changes the logic and also makes the if else-if more clearer > so the first check is only for architecture and after that in each block > we test for capabilities. I see now that I was mistaken and your change is correct. Sorry for the noise. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list