chiark / gitweb /
allow to overwrite the configured udev_root by exporting UDEV_ROOT
authorMarco d'Itri <md@Linux.IT>
Fri, 25 Nov 2005 17:56:06 +0000 (18:56 +0100)
committerKay Sievers <kay.sievers@suse.de>
Fri, 25 Nov 2005 17:56:06 +0000 (18:56 +0100)
udev_config.c

index 7037a17..c1af7c1 100644 (file)
@@ -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);