[libvirt] [PATCH 1/1] conf: fixup USB input bus check

Xiao Feng Ren renxiaof at linux.vnet.ibm.com
Thu May 31 09:11:58 UTC 2018


This patch fixes the USB input bus check, the bug was introduced by commit 317badb

Signed-off-by: Xiao Feng Ren <renxiaof at linux.vnet.ibm.com>
---
 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 27e2bd50eb..e4d39c06e8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -27878,7 +27878,7 @@ virDomainDeviceIsUSB(virDomainDeviceDefPtr dev)
     if ((t == VIR_DOMAIN_DEVICE_DISK &&
          dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_USB) ||
         (t == VIR_DOMAIN_DEVICE_INPUT &&
-         dev->data.input->type == VIR_DOMAIN_INPUT_BUS_USB) ||
+         dev->data.input->bus == VIR_DOMAIN_INPUT_BUS_USB) ||
         (t == VIR_DOMAIN_DEVICE_HOSTDEV &&
          dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
          dev->data.hostdev->source.subsys.type ==
-- 
2.16.3




More information about the libvir-list mailing list