]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Fix XML generation for smartcards
authorJiri Denemark <jdenemar@redhat.com>
Mon, 14 Feb 2011 10:49:28 +0000 (11:49 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 14 Feb 2011 18:42:29 +0000 (19:42 +0100)
When formatting 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

index 59adf3697950f91762c14a68be75eb369f1bc131..f2bb3aa20afaf2cb4bed7659449a5d13b9a5f41b 100644 (file)
@@ -7058,6 +7058,7 @@ virDomainSmartcardDefFormat(virBufferPtr buf,
             virBufferAddLit(buf, "/>\n");
             return 0;
         }
+        virBufferAddLit(buf, ">\n");
         break;
 
     case VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES: