chiark / gitweb /
udev: net_id - read ACPI _SUN -- slot user number
authorKay Sievers <kay@vrfy.org>
Fri, 23 Nov 2012 14:01:43 +0000 (15:01 +0100)
committerKay Sievers <kay@vrfy.org>
Fri, 23 Nov 2012 14:02:46 +0000 (15:02 +0100)
src/udev/udev-builtin-net_id.c

index 72237bf..10faec6 100644 (file)
@@ -50,8 +50,11 @@ static int dev_pci(struct udev_device *dev, const char *prefix, bool test) {
         if (!d || !streq("pci", udev_device_get_subsystem(d)))
                 return -ENOENT;
 
-        /* find SMBIOS type 41 entries for on-board devices */
-        index = udev_device_get_sysattr_value(d, "index");
+        /* ACPI _SUN  -- slot user number */
+        index = udev_device_get_sysattr_value(d, "acpi_index");
+        /* SMBIOS type 41 -- Onboard Devices Extended Information */
+        if (!index)
+                index = udev_device_get_sysattr_value(d, "index");
         if (index) {
                 unsigned int idx;