]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: fix formatting of smartcard devices
authorJán Tomko <jtomko@redhat.com>
Thu, 3 Aug 2017 12:26:47 +0000 (14:26 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 3 Aug 2017 15:19:04 +0000 (17:19 +0200)
commitb4f7793ce269ba163598c96c65761601556fb48b
treebe76ade4527fdfc8ebce116203cd3139331e216d
parentf536b0dd7318c736c20ae646209671011d16c12c
conf: fix formatting of smartcard devices

My commit 0c1d863 broke formatting of passthrough smartcard devices:
<smartcard mode='passthrough' type='spicevmc'/>

resulted in invalid XML:
    <smartcard mode='passthrough'>
       type='spicevmc'>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>

Split out chardev source formatting function into two -
one formatting the attributes and other formatting the subelements.

Reported-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-smartcard-controller.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-smartcard-host-certificates.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-smartcard-host.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-smartcard-passthrough-spicevmc.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-smartcard-passthrough-tcp.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c