diff options
-rw-r--r-- | src/mdevd/mdevd-coldplug.c | 2 | ||||
-rw-r--r-- | src/mdevd/mdevd.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/mdevd/mdevd-coldplug.c b/src/mdevd/mdevd-coldplug.c index e692fd4..08e681a 100644 --- a/src/mdevd/mdevd-coldplug.c +++ b/src/mdevd/mdevd-coldplug.c @@ -151,7 +151,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (strcmp(x, "add")) continue ; x = mdevd_uevent_getvar(&event, "SUBSYSTEM") ; if (strcmp(x, subsystem)) continue ; - x = mdevd_uevent_getvar(&event, "MDEV") ; + x = strrchr(mdevd_uevent_getvar(&event, "DEVPATH"), '/') + 1 ; if (!strcmp(x, mdev)) break ; } } diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c index 1ac2bc6..1a3c9d2 100644 --- a/src/mdevd/mdevd.c +++ b/src/mdevd/mdevd.c @@ -709,6 +709,7 @@ static inline int run_scriptelem (struct uevent_s *event, scriptelem const *elem } } else spawn_command(storage + elem->command, event, elem->flagexecline, ud) ; + event->varn-- ; event->len -= 6 + nodelen ; } if (elem->movetype != MOVEINFO_NOCREATE && ud->action == ACTION_REMOVE && ud->mmaj >= 0) |