diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-25 02:21:07 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-25 02:21:07 +0100 |
commit | 37854ffc9ae60da66d5525225c93eb1754a780bb (patch) | |
tree | b410a3da7e27273aa13ec08c8bee95545286c367 /udev_device.c | |
parent | ad27f5b3962d4cb1e4fcc25d3d0c7d0c81abc82a (diff) |
let "ignore_device" always return the event successfully
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_device.c')
-rw-r--r-- | udev_device.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/udev_device.c b/udev_device.c index 781787ef4a..5db27093d4 100644 --- a/udev_device.c +++ b/udev_device.c @@ -88,14 +88,14 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) udev_rules_get_name(rules, udev); if (udev->ignore_device) { info("device event will be ignored"); - return -1; + return 0; } /* create node, store in db */ if (udev->name[0] != '\0') retval = udev_add_device(udev); else info("device node creation supressed"); - return 0; + return retval; } if (major(udev->devt) != 0 && strcmp(udev->action, "remove") == 0) { @@ -104,7 +104,7 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) udev_rules_get_run(rules, udev); if (udev->ignore_device) { info("device event will be ignored"); - return -1; + return 0; } /* get data from db, remove db-entry, delete node */ retval = udev_remove_device(udev); @@ -112,15 +112,13 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev) /* restore stored persistent data */ list_for_each_entry(name_loop, &udev->env_list, node) putenv(name_loop->name); - return 0; + return retval; } - /* default devices */ + /* default devices without a node */ udev_rules_get_run(rules, udev); - if (udev->ignore_device) { + if (udev->ignore_device) info("device event will be ignored"); - return -1; - } return retval; } |