summaryrefslogtreecommitdiff
path: root/udev.c
diff options
context:
space:
mode:
authortrini@kernel.crashing.org <trini@kernel.crashing.org>2004-08-11 01:02:59 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:36:59 -0700
commit2410242aa4d21335026d3b90116078c9146a32f3 (patch)
tree9c582b28a6b04c9aa18757589bfdcdd561ecc80b /udev.c
parenta4f5eb034bdbb77236f24f24c09286aa03f404ab (diff)
[PATCH] fix UDEV_NO_SLEEP
Move setting UDEV_NO_SLEEP into main(). I thought about moving udev_init_config() around, but it still must be invoked in both udev and udevstart cases, and before udev_hotplug() is called. An alternative would be to have main() do: if (is_udevstart) { ... current ... } else { udev_init_config(); return udev_hotplug(); } And move setting UDEV_NO_SLEEP into udev_start(). I can redo it that way, if you prefer. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'udev.c')
-rw-r--r--udev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/udev.c b/udev.c
index 0ef4cf8657..90c34d800a 100644
--- a/udev.c
+++ b/udev.c
@@ -174,8 +174,11 @@ int main(int argc, char *argv[], char *envp[])
main_argv = argv;
main_envp = envp;
- if (strstr(argv[0], "udevstart"))
+ if (strstr(argv[0], "udevstart")) {
+ /* Setup env variables. */
+ setenv("UDEV_NO_SLEEP", "1", 1);
is_udevstart = 1;
+ }
/* initialize our configuration */
udev_init_config();