summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-07-30 22:34:07 +0200
committerKay Sievers <kay@vrfy.org>2012-07-30 22:34:07 +0200
commit023b9d33e93ea79b6f81daab82cfdca35360e2d0 (patch)
treed986a34e342a1734738ba02df533d067cc9b25db /src
parent45646bb0d1ac8f17a8401cf5c51034475719c7e1 (diff)
udev: set log.c's log level from udev's kernel command line option
Diffstat (limited to 'src')
-rw-r--r--src/udev/udevd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index a028c9cac0..b78c18f20a 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1035,14 +1035,17 @@ static void kernel_cmdline_options(struct udev *udev)
else
opt = s;
- if (startswith(opt, "udev.log-priority="))
- udev_set_log_priority(udev, util_log_priority(opt + 18));
+ if (startswith(opt, "udev.log-priority=")) {
+ int prio;
- if (startswith(opt, "udev.children-max="))
+ prio = util_log_priority(opt + 18);
+ log_set_max_level(prio);
+ udev_set_log_priority(udev, prio);
+ } else if (startswith(opt, "udev.children-max=")) {
children_max = strtoul(opt + 18, NULL, 0);
-
- if (startswith(opt, "udev.exec-delay="))
+ } else if (startswith(opt, "udev.exec-delay=")) {
exec_delay = strtoul(opt + 16, NULL, 0);
+ }
free(s);
}