diff options
Diffstat (limited to '')
-rw-r--r-- | src/udev/udevd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 028492721e..b179dfac37 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1254,7 +1254,17 @@ static int on_ctrl_msg(UdevCtrl *uctrl, UdevCtrlMessageType type, const UdevCtrl switch (type) { case UDEV_CTRL_SET_LOG_LEVEL: + if ((value->intval & LOG_PRIMASK) != value->intval) { + log_debug("Received invalid udev control message (SET_LOG_LEVEL, %i), ignoring.", value->intval); + break; + } + log_debug("Received udev control message (SET_LOG_LEVEL), setting log_level=%i", value->intval); + + r = log_get_max_level(); + if (r == value->intval) + break; + log_set_max_level(value->intval); manager->log_level = value->intval; manager_kill_workers(manager, false); |