mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Revert "Also look for dmi information in /sys/class"
Assume nobody runs current libvirt on kernels such as 2.6.26.
Kernel commit 9f9c9cbb60576a1518d0bf93fb8e499cffccf377 (released
in 3.8) mentions the new path and I believe it was added by:
commit 948af1f0bbc8526448e8cbe3f8d3bf211bdf5181
firmware: Basic dmi-sysfs support
(released in 2.6.39), but I cannot figure out how all that
kernel automagic works.
This reverts commit 4c81b0fdc5
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
cbd984d43a
commit
83b156e1b7
@ -1731,14 +1731,11 @@ udevGetDMIData(virNodeDevCapSystemPtr syscap)
|
||||
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
|
||||
if (device == NULL) {
|
||||
device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
|
||||
if (device == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to get udev device for syspath '%s' or '%s'"),
|
||||
DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
|
||||
virObjectUnlock(priv);
|
||||
return;
|
||||
}
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to get udev device for syspath '%s'"),
|
||||
DMI_DEVPATH);
|
||||
virObjectUnlock(priv);
|
||||
return;
|
||||
}
|
||||
virObjectUnlock(priv);
|
||||
|
||||
|
@ -24,4 +24,3 @@
|
||||
|
||||
#define SYSFS_DATA_SIZE 4096
|
||||
#define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
|
||||
#define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
|
||||
|
Loading…
Reference in New Issue
Block a user