[PATCH] conf: Don't parse edev of non-passthrough input device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In input devices, edev attribute is only for passthrough devices.
Don't parse this for other input devices.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591151

Signed-off-by: Han Han <hhan@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 7396616eda..ea2e796b78 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13050,7 +13050,8 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr xmlopt,
         goto error;
     }
 
-    if ((evdev = virXPathString("string(./source/@evdev)", ctxt)))
+    if ((evdev = virXPathString("string(./source/@evdev)", ctxt)) &&
+        (def->type == VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH))
         def->source.evdev = virFileSanitizePath(evdev);
     if (def->type == VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH && !def->source.evdev) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
-- 
2.17.1

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux