]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: Only set up mdevctl monitors if mdevctl.d exist
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 12 Apr 2021 15:26:06 +0000 (17:26 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Apr 2021 07:34:14 +0000 (09:34 +0200)
commitb3605a4d830dc7fb99cf800c8512130744842b4d
treeb57855d1ad223ca076ab1f1258b6c303ac6329a8
parent246af1278a318e344509ee14b716f91c0dea56e8
nodedev: Only set up mdevctl monitors if mdevctl.d exist

During its initialization, the nodedev driver tries to set up
monitors for /etc/mdevctl.d directory, so that it can register
mdevs as they come and go. However, if the file doesn't exist
there is nothing to monitor and therefore we can exit early. In
fact, we have to otherwise monitorFileRecursively() fails and
whole driver initialization fails with it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/node_device/node_device_udev.c