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