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 4c81b0fdc57b23d80b1b4752cd6143d15c02e9c8
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/node_device/node_device_udev.c | 13 +++++--------
src/node_device/node_device_udev.h | 1 -
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 2d0ca27fc6..29a7eaa07c 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -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);
diff --git a/src/node_device/node_device_udev.h b/src/node_device/node_device_udev.h
index 996677dfe0..eab22a9182 100644
--- a/src/node_device/node_device_udev.h
+++ b/src/node_device/node_device_udev.h
@@ -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"
--
2.26.2