- char *temp;
- int retval;
-
- retval = sysfs_get_mnt_path(sysfs_path, SYSFS_PATH_MAX);
- if (retval)
- dbg("sysfs_get_mnt_path failed");
-
- /* see if we should try to override any of the default values */
- if (getenv("UDEV_TEST") != NULL) {
- temp = getenv("SYSFS_PATH");
- if (temp != NULL) {
- strfieldcpy(sysfs_path, temp);
- no_trailing_slash(sysfs_path);
- }
+ const char *env;
+
+ strcpy(udev_root, UDEV_ROOT);
+ strcpy(udev_db_path, UDEV_DB);
+ strcpy(udev_config_filename, UDEV_CONFIG_FILE);
+ strcpy(udev_rules_filename, UDEV_RULES_FILE);
+ udev_log_priority = LOG_ERR;
+ udev_run = 1;
+ udev_dev_d = 1;
+ udev_hotplug_d = 1;
+ sysfs_get_mnt_path(sysfs_path, sizeof(sysfs_path));
+
+ /* disable RUN key execution */
+ env = getenv("UDEV_RUN");
+ if (env && !string_is_true(env))
+ udev_run = 0;