From: Marco d'Itri Date: Fri, 25 Nov 2005 17:56:06 +0000 (+0100) Subject: allow to overwrite the configured udev_root by exporting UDEV_ROOT X-Git-Tag: 174~2442 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2796c47b5c88f2775247fd0cddc1385d6bbb10bd;hp=a8a614a7018918e987585c2d07189024c640cb3a allow to overwrite the configured udev_root by exporting UDEV_ROOT --- diff --git a/udev_config.c b/udev_config.c index 7037a1708..c1af7c12c 100644 --- a/udev_config.c +++ b/udev_config.c @@ -192,6 +192,12 @@ void udev_init_config(void) parse_config_file(); + env = getenv("UDEV_ROOT"); + if (env) { + strlcpy(udev_root, env, sizeof(udev_root)); + remove_trailing_chars(udev_root, '/'); + } + env = getenv("UDEV_LOG"); if (env) udev_log_priority = log_priority(env);