summaryrefslogtreecommitdiff
path: root/udev_config.c
diff options
context:
space:
mode:
authorazarah@nosferatu.za.org <azarah@nosferatu.za.org>2004-02-11 19:42:51 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:26 -0700
commit4d803d8d04a8493f8efc039c7789c65be33048a0 (patch)
tree5e349c87952f1dba4469095b7337830dcb3dd265 /udev_config.c
parentda92f46b9e86643e70861bb705453f81aef5618d (diff)
[PATCH] make logging a config option
Once again, patch to make logging a config option. Reason for this (since you asked for it): - In our setup it is easy (although still annoying) .. just edit the ebuild, add logging support (or remove it) and rebuild. For say a binary distro, having the logging is useful for debugging some times, but its more a once of, or rare thing, as you do not add or change config files every day. Sure, we can have logging by default, but many do not want ~300 lines of extra debugging in their logs is not pleasant, and they will complain. Rebuilding the package for that binary package (given the users it is targeted to) is usually not within most users grasp.
Diffstat (limited to 'udev_config.c')
-rw-r--r--udev_config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/udev_config.c b/udev_config.c
index 6d39d294e1..ec38272bc5 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -48,6 +48,7 @@ char udev_config_filename[PATH_MAX+NAME_MAX];
char default_mode_str[MODE_SIZE];
char default_owner_str[OWNER_SIZE];
char default_group_str[GROUP_SIZE];
+char udev_log_str[BOOL_SIZE];
static void init_variables(void)
@@ -60,6 +61,7 @@ static void init_variables(void)
strfieldcpy(udev_config_filename, UDEV_CONFIG_FILE);
strfieldcpy(udev_rules_filename, UDEV_RULES_FILE);
strfieldcpy(udev_permissions_filename, UDEV_PERMISSION_FILE);
+ strfieldcpy(udev_log_str, UDEV_LOG_DEFAULT);
}
#define set_var(_name, _var) \
@@ -156,6 +158,7 @@ static int parse_config_file(void)
set_var("default_mode", default_mode_str);
set_var("default_owner", default_owner_str);
set_var("default_group", default_group_str);
+ set_var("udev_log", udev_log_str);
}
dbg_parse("%s:%d:%Zd: error parsing '%s'", udev_config_filename,
lineno, temp - line, temp);
@@ -191,6 +194,7 @@ static void get_dirs(void)
dbg_parse("udev_db_filename = %s", udev_db_filename);
dbg_parse("udev_rules_filename = %s", udev_rules_filename);
dbg_parse("udev_permissions_filename = %s", udev_permissions_filename);
+ dbg_parse("udev_log_str = %s", udev_log_str);
parse_config_file();
dbg_parse("udev_root = %s", udev_root);
@@ -198,6 +202,7 @@ static void get_dirs(void)
dbg_parse("udev_db_filename = %s", udev_db_filename);
dbg_parse("udev_rules_filename = %s", udev_rules_filename);
dbg_parse("udev_permissions_filename = %s", udev_permissions_filename);
+ dbg_parse("udev_log_str = %s", udev_log_str);
}
void udev_init_config(void)