summaryrefslogtreecommitdiff
path: root/udev.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-22 02:11:59 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-22 02:11:59 +0200
commitc9b8dbfb652a10d2f1c1b122a3806c21cab87ab4 (patch)
treeb5becd9919e10fc73f5b7bc3701ae54bf689aeb2 /udev.c
parent972d318a3123b00d0ed6b78bbcf70a0965841a8e (diff)
fix the fix and change the file to wait for to the "bus" link
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev.c')
-rw-r--r--udev.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/udev.c b/udev.c
index 67d081d005..36ff21d5b7 100644
--- a/udev.c
+++ b/udev.c
@@ -179,27 +179,25 @@ int main(int argc, char *argv[], char *envp[])
/* export name of device node or netif */
if (udev.devname[0] != '\0')
setenv("DEVNAME", udev.devname, 1);
- } else if (udev.type == DEV_DEVICE) {
- if (strcmp(action, "add") == 0) {
- struct sysfs_device *devices_dev;
-
- /* wait for sysfs of /sys/devices/ */
- dbg("devices add");
- snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath);
- path[sizeof(path)-1] = '\0';
- devices_dev = wait_devices_device_open(path);
- if (!devices_dev) {
- dbg("devices device unavailable (probably remove has beaten us)");
- goto run;
- }
- dbg("devices device opened '%s'", path);
- wait_for_devices_device(devices_dev, &error);
- udev_rules_get_run(&udev, devices_dev);
- sysfs_close_device(devices_dev);
- if (udev.ignore_device) {
- info("device event will be ignored");
- goto cleanup;
- }
+ } else if (udev.type == DEV_DEVICE && strcmp(action, "add") == 0) {
+ struct sysfs_device *devices_dev;
+
+ /* wait for sysfs of /sys/devices/ */
+ dbg("devices add");
+ snprintf(path, sizeof(path), "%s%s", sysfs_path, devpath);
+ path[sizeof(path)-1] = '\0';
+ devices_dev = wait_devices_device_open(path);
+ if (!devices_dev) {
+ dbg("devices device unavailable (probably remove has beaten us)");
+ goto run;
+ }
+ dbg("devices device opened '%s'", path);
+ wait_for_devices_device(devices_dev, &error);
+ udev_rules_get_run(&udev, devices_dev);
+ sysfs_close_device(devices_dev);
+ if (udev.ignore_device) {
+ info("device event will be ignored");
+ goto cleanup;
}
} else {
dbg("default handling");