chiark / gitweb /
[PATCH] remove the debian specific file, as they don't want to share with the rest...
[elogind.git] / wait_for_sysfs.c
index cb94b64404e24e346f7e698c472704abae3ac99c..c1d7aa0a0c045fcb06b2ecec07c1cfc11996ad67 100644 (file)
@@ -63,6 +63,10 @@ static int wait_for_class_device_attributes(struct sysfs_class_device *class_dev
                { .subsystem = "usb_host",      .file = NULL },
                { .subsystem = "bluetooth",     .file = "address" },
                { .subsystem = "i2c-adapter",   .file = NULL },
+               { .subsystem = "pci_bus",       .file = NULL },
+               { .subsystem = "ieee1394",      .file = NULL },
+               { .subsystem = "ieee1394_host", .file = NULL },
+               { .subsystem = "ieee1394_node", .file = NULL },
                { NULL, NULL }
        };
        struct class_file *classfile;
@@ -99,7 +103,8 @@ static int wait_for_class_device_attributes(struct sysfs_class_device *class_dev
 /* skip waiting for physical device */
 static int class_device_expect_no_device_link(struct sysfs_class_device *class_dev)
 {
-       /* List of devices without a "device" symlink */
+       /* List of devices without a "device" symlink
+        * set .device to NULL to accept all devices in that subsystem */
        static struct class_device {
                char *subsystem;
                char *device;
@@ -125,8 +130,7 @@ static int class_device_expect_no_device_link(struct sysfs_class_device *class_d
                { .subsystem = "input",         .device = "mice" },
                { .subsystem = "input",         .device = "mouse" },
                { .subsystem = "input",         .device = "ts" },
-               { .subsystem = "vc",            .device = "vcs" },
-               { .subsystem = "vc",            .device = "vcsa" },
+               { .subsystem = "vc",            .device = NULL },
                { .subsystem = "tty",           .device = NULL },
                { .subsystem = "cpuid",         .device = "cpu" },
                { .subsystem = "graphics",      .device = "fb" },
@@ -134,9 +138,18 @@ static int class_device_expect_no_device_link(struct sysfs_class_device *class_d
                { .subsystem = "misc",          .device = NULL },
                { .subsystem = "msr",           .device = NULL },
                { .subsystem = "netlink",       .device = NULL },
+               { .subsystem = "net",           .device = NULL },
                { .subsystem = "sound",         .device = NULL },
-               { .subsystem = "snd",           .device = NULL },
                { .subsystem = "printer",       .device = "lp" },
+               { .subsystem = "nvidia",        .device = NULL },
+               { .subsystem = "video4linux",   .device = NULL },
+               { .subsystem = "lirc",          .device = NULL },
+               { .subsystem = "firmware",      .device = NULL },
+               { .subsystem = "drm",           .device = NULL },
+               { .subsystem = "pci_bus",       .device = NULL },
+               { .subsystem = "ieee1394",      .device = NULL },
+               { .subsystem = "ieee1394_host", .device = NULL },
+               { .subsystem = "ieee1394_node", .device = NULL },
                { NULL, NULL }
        };
        struct class_device *classdevice;
@@ -395,8 +408,8 @@ exit:
                dbg("result: waiting for sysfs successful '%s'", devpath);
        else
                info("error: wait_for_sysfs needs an update to handle the device '%s' "
-                    "properly, please report to <linux-hotplug-devel@lists.sourceforge.net>",
-                    devpath);
+                    "properly (%d), please report to <linux-hotplug-devel@lists.sourceforge.net>",
+                    devpath, rc);
 
        return rc;
 }