summaryrefslogtreecommitdiff
path: root/udev_config.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-05 05:11:29 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-05 05:11:29 +0200
commit6a522681e1438bbd9c317654cc35d5d206d378ad (patch)
tree8a580e47fcd69bd32c9cfb354c5e74e777519300 /udev_config.c
parentc974742bf4d6d8fab1e1c90e2e57dae0a2f297a1 (diff)
udev: move dev.d/ handling to external helper
Modern rules are expected to call notification and postprocessing with the RUN key. For compatibility the current behavior can be emulated with an external helper. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_config.c')
-rw-r--r--udev_config.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/udev_config.c b/udev_config.c
index 6bc070d63a..0701d37e84 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -45,40 +45,8 @@ char udev_config_filename[PATH_SIZE];
char udev_rules_filename[PATH_SIZE];
int udev_log_priority;
int udev_run;
-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 int log_priority(const char *priority)
-{
- char *endptr;
- int prio;
-
- prio = strtol(priority, &endptr, 10);
- if (endptr[0] == '\0')
- return prio;
- if (strncasecmp(priority, "err", 3) == 0)
- return LOG_ERR;
- if (strcasecmp(priority, "info") == 0)
- return LOG_INFO;
- if (strcasecmp(priority, "debug") == 0)
- return LOG_DEBUG;
- if (string_is_true(priority))
- return LOG_ERR;
-
- return 0;
-}
-
static int get_key(char **line, char **key, char **value)
{
char *linepos;
@@ -219,7 +187,6 @@ void udev_init_config(void)
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));
@@ -228,10 +195,6 @@ void udev_init_config(void)
if (env && !string_is_true(env))
udev_run = 0;
- env = getenv("UDEV_NO_DEVD");
- if (env && string_is_true(env))
- udev_dev_d = 0;
-
env = getenv("UDEV_NO_HOTPLUGD");
if (env && string_is_true(env))
udev_hotplug_d = 0;