-char sysfs_path[SYSFS_PATH_MAX];
-char udev_root[PATH_MAX];
-char udev_db_path[PATH_MAX+NAME_MAX];
-char udev_permissions_filename[PATH_MAX+NAME_MAX];
-char udev_rules_filename[PATH_MAX+NAME_MAX];
-char udev_config_filename[PATH_MAX+NAME_MAX];
-mode_t default_mode;
-char default_owner[USER_SIZE];
-char default_group[USER_SIZE];
-int udev_log;
-int udev_dev_d;
-int udev_hotplug_d;
-
-
-static int string_is_true(const char *str)
-{
- if (strcasecmp(str, "true") == 0)
- return 1;
- if (strcasecmp(str, "yes") == 0)
- return 1;
- if (strcasecmp(str, "1") == 0)
- return 1;
- return 0;
-}
-
-static void init_variables(void)
-{
- const char *env;
-
- /* If any config values are specified, they will override these values. */
- 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);
- strcpy(udev_permissions_filename, UDEV_PERMISSION_FILE);
-
- strcpy(default_owner, "root");
- strcpy(default_group, "root");
- default_mode = 0600;
-
- udev_log = string_is_true(UDEV_LOG_DEFAULT);
-
- udev_dev_d = 1;
- env = getenv("UDEV_NO_DEVD");
- if (env && string_is_true(env))
- udev_dev_d = 0;
-
- udev_hotplug_d = 1;
- env = getenv("UDEV_NO_HOTPLUGD");
- if (env && string_is_true(env))
- udev_hotplug_d = 0;
-}
-
-int parse_get_pair(char **orig_string, char **left, char **right)
+char sysfs_path[PATH_SIZE];
+char udev_root[PATH_SIZE];
+char udev_db_path[PATH_SIZE];
+char udev_config_filename[PATH_SIZE];
+char udev_rules_filename[PATH_SIZE];
+int udev_log_priority;
+int udev_run;
+
+static int get_key(char **line, char **key, char **value)