mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
Fix an error when looking for devices in syspath
* src/node_device/node_device_udev.c: udevSetupSystemDev() only print the error message if lookup failed in both DMI_DEVPATH and DMI_DEVPATH_FALLBACK
This commit is contained in:
parent
ca18b7108d
commit
e5df24a11c
@ -1454,11 +1454,10 @@ static int udevSetupSystemDev(void)
|
||||
udev = udev_monitor_get_udev(DRV_STATE_UDEV_MONITOR(driverState));
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
|
||||
if (device == NULL) {
|
||||
VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH);
|
||||
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
|
||||
if (device == NULL) {
|
||||
VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH_FALLBACK);
|
||||
VIR_ERROR("Failed to get udev device for syspath '%s' or '%s'",
|
||||
DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user