qemu: Use correct bus type for input devices

commit 7210cef452 'qemu: build command line for virtio input devices'
introduced an error, by checking if input bus type is
VIR_DOMAIN_DISK_BUS_VIRTIO.

Fix it by using the correct bus type for input devices.

Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Farhan Ali 2018-03-08 11:07:04 -05:00 committed by John Ferlan
parent 21c6ec2ff7
commit c8935705f1

View File

@ -309,7 +309,7 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
}
for (i = 0; i < def->ninputs; i++) {
if (def->inputs[i]->bus == VIR_DOMAIN_DISK_BUS_VIRTIO &&
if (def->inputs[i]->bus == VIR_DOMAIN_INPUT_BUS_VIRTIO &&
def->inputs[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE)
def->inputs[i]->info.type = type;
}