[libvirt] [PATCH v1 4/7] qemu: Use correct bus type for input devices

Farhan Ali posted 7 patches 7 years, 2 months ago
There is a newer version of this series
[libvirt] [PATCH v1 4/7] qemu: Use correct bus type for input devices
Posted by Farhan Ali 7 years, 2 months ago
commit 7210cef452db '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>
---
 src/qemu/qemu_domain_address.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 49a293e..d66c3d0 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -317,7 +317,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;
     }
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 4/7] qemu: Use correct bus type for input devices
Posted by John Ferlan 7 years, 1 month ago

On 03/08/2018 11:07 AM, Farhan Ali wrote:
> commit 7210cef452db '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>
> ---
>  src/qemu/qemu_domain_address.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Nice catch!  Been around awhile too.  Doesn't look like there was a test
to catch it either.

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

(I'll push this along with patch 1 since it's separable)

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v1 4/7] qemu: Use correct bus type for input devices
Posted by Farhan Ali 7 years, 1 month ago

On 03/16/2018 09:39 AM, John Ferlan wrote:
> 
> 
> On 03/08/2018 11:07 AM, Farhan Ali wrote:
>> commit 7210cef452db '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>
>> ---
>>   src/qemu/qemu_domain_address.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
> 
> Nice catch!  Been around awhile too.  Doesn't look like there was a test
> to catch it either.

Hopefully my virtio ccw input tests should be enough to cover this?

> 
> Reviewed-by: John Ferlan <jferlan@redhat.com>
> 
> John
> 
> (I'll push this along with patch 1 since it's separable)
> 


Thanks so much for all your review, I really appreciate all your 
feeedback :)

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