diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-12-12 03:29:59 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:13:48 -0700 |
commit | 7e0bd584756b87d57b3f3e62dcbac208476f1804 (patch) | |
tree | 8b63cf1d5765f5743ea10366d5a0ca74d413f7cf | |
parent | 8544c9ad4febef602d640905a70c350364f98967 (diff) |
[PATCH] check earlier if we should run as udevstart
-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; |