diff options
Diffstat (limited to 'udev.c')
-rw-r--r-- | udev.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -128,14 +128,6 @@ int main(int argc, char *argv[], char *envp[]) /* trigger timeout to prevent hanging processes */ alarm(ALARM_TIMEOUT); - action = getenv("ACTION"); - devpath = getenv("DEVPATH"); - subsystem = getenv("SUBSYSTEM"); - /* older kernels passed the SUBSYSTEM only as argument */ - if (!subsystem && argc == 2) - subsystem = argv[1]; - udev_init_device(&udev, devpath, subsystem); - if (strstr(argv[0], "udevstart") || (argc == 2 && strstr(argv[1], "udevstart"))) { dbg("udevstart"); @@ -147,6 +139,14 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } + action = getenv("ACTION"); + devpath = getenv("DEVPATH"); + subsystem = getenv("SUBSYSTEM"); + /* older kernels passed the SUBSYSTEM only as argument */ + if (!subsystem && argc == 2) + subsystem = argv[1]; + udev_init_device(&udev, devpath, subsystem); + if (!action) { dbg("no action"); goto hotplug; |