mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
Also look for dmi information in /sys/class
older kernels such as 2.6.26 have it there.
This commit is contained in:
parent
28024f2311
commit
4c81b0fdc5
@ -1407,7 +1407,12 @@ static int udevSetupSystemDev(void)
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
|
||||
if (device == NULL) {
|
||||
VIR_ERROR("Failed to get udev device for syspath '%s'\n", DMI_DEVPATH);
|
||||
goto out;
|
||||
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
|
||||
if (device == NULL) {
|
||||
VIR_ERROR("Failed to get udev device for syspath '%s'\n", DMI_DEVPATH_FALLBACK);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
data = &def->caps->data;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define SYSFS_DATA_SIZE 4096
|
||||
#define DRV_STATE_UDEV_MONITOR(ds) ((struct udev_monitor *)((ds)->privateData))
|
||||
#define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
|
||||
#define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
|
||||
#define PROPERTY_FOUND 0
|
||||
#define PROPERTY_MISSING 1
|
||||
#define PROPERTY_ERROR -1
|
||||
|
Loading…
x
Reference in New Issue
Block a user