]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: Add the missing PCI dev checks for 'mdev_types' capability v4.0.0-rc2
authorDan Zheng <dzheng@redhat.com>
Tue, 16 Jan 2018 04:21:21 +0000 (12:21 +0800)
committerErik Skultety <eskultet@redhat.com>
Tue, 16 Jan 2018 09:33:25 +0000 (10:33 +0100)
commit75cfb8434eab67b790c5979deafd63396bf84ece
tree8b58b6fbf5876269ac245f2e88373cbe9f4bba0d
parent74416b1d4849ef77ef31de5344dd75f03094434b
nodedev: Add the missing PCI dev checks for 'mdev_types' capability

Similar to commit @f44ec9c1, commit @500cbc06 introduced a new nested
'mdev_types' capability, however the mentioned commit didn't adjust
virNodeDeviceNumOfCaps and virNodeDeviceListCaps functions accordingly
to provide proper support for this capability.

After applying this patch the following python snippet returns the
expected results:
    import libvirt
    conn = libvirt.openReadOnly('qemu:///system')
    devs = conn.listAllDevices()
    for dev in devs:
        if 'mdev_types' in dev.listCaps():
            print dev.name(),dev.numOfCaps(),dev.listCaps()

Signed-off-by: Dan Zheng <dzheng@redhat.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/node_device/node_device_driver.c