older kernels such as 2.6.26 have it there.
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;
#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