]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodeDeviceParseMdevctlJSON: Accept empty string
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 08:08:07 +0000 (10:08 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Aug 2023 11:45:55 +0000 (13:45 +0200)
commit4e00d7fb041687e4c29764077011f1ed0c1c03aa
tree4d0908574b40114d85bf451807e3792e9d774344
parent857efc74fe0b3ade0ad143a63d1cc7272edffa4c
nodeDeviceParseMdevctlJSON: Accept empty string

It is possible for 'mdevctl' to output nothing, an empty string
(e.g. when no mediated devices are defined on the host). What is
weird is that when passing '--defined' then 'mdevctl' outputs an
empty JSON array instead. Nevertheless, we should accept both and
treat them the same, i.e. as no mediated devices.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/523
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
src/node_device/node_device_driver.c