diff options
author | Kay Sievers <kay@vrfy.org> | 2014-05-14 00:34:49 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-05-15 10:32:26 +0200 |
commit | 1ea972174baba40dbc80c51cbfc4edc49764b59b (patch) | |
tree | c208a821788d051ade3adecc695c9f2c5bee4460 /src/udev/udev-event.c | |
parent | 19befb2d5fc087f96e40ddc432b2cc9385666209 (diff) |
udev: do not skip the execution of RUN when renaming a network device fails
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r-- | src/udev/udev-event.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 2cab42bbc6..5213a4abaa 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -776,13 +776,12 @@ static int rename_netif(struct udev_event *event) return r; } -int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) +void udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigmask) { struct udev_device *dev = event->dev; - int err = 0; if (udev_device_get_subsystem(dev) == NULL) - return -1; + return; if (streq(udev_device_get_action(dev), "remove")) { udev_device_read_db(dev, NULL); @@ -816,9 +815,10 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, event->name != NULL && !streq(event->name, udev_device_get_sysname(dev))) { char syspath[UTIL_PATH_SIZE]; char *pos; + int r; - err = rename_netif(event); - if (err == 0) { + r = rename_netif(event); + if (r >= 0) { log_debug("renamed netif to '%s'", event->name); /* remember old name */ @@ -881,7 +881,6 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, udev_device_unref(event->dev_db); event->dev_db = NULL; } - return err; } void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask) |