1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00
libvirt/tests/virnetworkportxml2xmldata/plug-hostdev-pci-unmanaged.xml
Andrea Bolognani 06f5c092b8 conf: Format managed property of hostdev-pci ports correctly
The property is parsed using virTristateBoolTypeFromString() but
formatted as if it was a regular bool, which results in the
following incorrect conversion:

  BOOL_ABSENT -> managed='no'
  BOOL_YES    -> managed='yes'
  BOOL_NO     -> managed='yes'

Use the virTristateBoolTypeToString() helper to ensure the
setting can survive a roundtrip conversion.

Fixes: 4b4a981d60
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-05 13:40:33 +02:00

13 lines
364 B
XML

<networkport>
<uuid>5d744f21-ba4a-4d6e-bdb2-30a35ff3207d</uuid>
<owner>
<name>memtest</name>
<uuid>d54df46f-1ab5-4a22-8618-4560ef5fac2c</uuid>
</owner>
<mac address='52:54:00:7b:35:93'/>
<plug type='hostdev-pci' managed='no'>
<driver name='vfio'/>
<address domain='0x0001' bus='0x02' slot='0x03' function='0x4'/>
</plug>
</networkport>