]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Explain some code in more detail
authorAndrea Bolognani <abologna@redhat.com>
Wed, 12 Oct 2016 15:02:37 +0000 (17:02 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 17 Oct 2016 08:04:54 +0000 (10:04 +0200)
commit61e101437bd5bdeedf843cd5bc7a4950684d905f
treeafae68af4a6abb75b40f26d0bd9f3ccbfc66b405
parent538220c3c42cad0adbd818b6a931c69492a572de
conf: Explain some code in more detail

The code is entirely correct, but it still managed to trip me
up when I first ran into it because I did not realize right away
that VIR_PCI_CONNECT_TYPES_ENDPOINT was not a single flag, but
rather a mask including both VIR_PCI_CONNECT_TYPE_PCI_DEVICE and
VIR_PCI_CONNECT_TYPE_PCIE_DEVICE.

In order to save the next distracted traveler in PCI Address Land
some time, document this fact with a comment. Add a test case for
the behavior as well.
src/conf/domain_addr.c
tests/qemuxml2argvdata/qemuxml2argv-q35-pci-force-address.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-q35-pci-force-address.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pci-force-address.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c