X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev_config.c;h=1b6b6142600dbb19221cb5767cf0d8c29f5f7bc3;hp=45b11de2aa573ef3485e7ef80fe5a6e8a0843e9a;hb=65005a7f81f86590f7f03bd3d4019c485d0e3c77;hpb=93ca11e4be8f4414f09ba60d9d8c77ec8ff2ec3b diff --git a/udev_config.c b/udev_config.c index 45b11de2a..1b6b61426 100644 --- a/udev_config.c +++ b/udev_config.c @@ -219,24 +219,14 @@ static int parse_config_file(void) void udev_init_config(void) { + const char *config; init_variables(); sysfs_get_mnt_path(sysfs_path, sizeof(sysfs_path)); - /* see if we should try to override any of the default values */ - if (getenv("UDEV_TEST") != NULL) { - char *temp; - - temp = getenv("SYSFS_PATH"); - if (temp != NULL) { - strlcpy(sysfs_path, temp, sizeof(sysfs_path)); - no_trailing_slash(sysfs_path); - } - - temp = getenv("UDEV_CONFIG_FILE"); - if (temp != NULL) - strlcpy(udev_config_filename, temp, sizeof(udev_config_filename)); - } + config = getenv("UDEV_CONFIG_FILE"); + if (config != NULL) + strlcpy(udev_config_filename, config, sizeof(udev_config_filename)); parse_config_file(); dbg("sysfs_path='%s'", sysfs_path);