When formating XML for smartcard device with mode=host, libvirt
generates invalid XML if the device has address info associated:

<smartcard mode='host' <address type='ccid' controller='0' slot='1'/>
---
 src/conf/domain_conf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 59adf36..f2bb3aa 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7058,6 +7058,7 @@ virDomainSmartcardDefFormat(virBufferPtr buf,
             virBufferAddLit(buf, "/>\n");
             return 0;
         }
+        virBufferAddLit(buf, ">\n");
         break;
 
     case VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES:
-- 
1.7.4

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

Reply via email to