]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Revert "Also look for dmi information in /sys/class"
authorJán Tomko <jtomko@redhat.com>
Wed, 30 Sep 2020 16:44:53 +0000 (18:44 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 2 Oct 2020 11:56:46 +0000 (13:56 +0200)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/node_device/node_device_udev.c
src/node_device/node_device_udev.h

index 2d0ca27fc6aa95d554d721849d967f05853fc5c7..29a7eaa07c26cbb6991a27bdc2d3dd9997032005 100644 (file)
@@ -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);
 
index 996677dfe0847ef17021a03f758ee5ca7952f083..eab22a91821c534b43fcaec9638ef91b45cd0c5c 100644 (file)
@@ -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"