提交 4c81b0fd 编写于 作者: G Guido Günther

Also look for dmi information in /sys/class

older kernels such as 2.6.26 have it there.
上级 28024f23
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册