diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index b67639c92e..b0b45f4c62 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -263,8 +263,8 @@ - udev.log_priority= - rd.udev.log_priority= + udev.log_level= + rd.udev.log_level= udev.children_max= rd.udev.children_max= udev.exec_delay= diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml index da7389c731..e49690dc74 100644 --- a/man/systemd-udevd.service.xml +++ b/man/systemd-udevd.service.xml @@ -143,8 +143,8 @@ Parameters prefixed with "rd." will be read when systemd-udevd is used in an initrd, those without will be processed both in the initrd and on the host. - udev.log_priority= - rd.udev.log_priority= + udev.log_level= + rd.udev.log_level= Set the log level. diff --git a/man/udevadm.xml b/man/udevadm.xml index a716b1819d..c78faa5a06 100644 --- a/man/udevadm.xml +++ b/man/udevadm.xml @@ -398,7 +398,7 @@ - + Set the internal log level of systemd-udevd. Valid values are the diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c index 82e2514932..6096dcbe78 100644 --- a/src/udev/udevadm-control.c +++ b/src/udev/udevadm-control.c @@ -34,7 +34,7 @@ static int help(void) { " -h --help Show this help\n" " -V --version Show package version\n" " -e --exit Instruct the daemon to cleanup and exit\n" - " -l --log-priority=LEVEL Set the udev log level for the daemon\n" + " -l --log-level=LEVEL Set the udev log level for the daemon\n" " -s --stop-exec-queue Do not execute events, queue only\n" " -S --start-exec-queue Execute events, flush queue\n" " -R --reload Reload rules and databases\n" @@ -58,7 +58,8 @@ int control_main(int argc, char *argv[], void *userdata) { static const struct option options[] = { { "exit", no_argument, NULL, 'e' }, - { "log-priority", required_argument, NULL, 'l' }, + { "log-level", required_argument, NULL, 'l' }, + { "log-priority", required_argument, NULL, 'l' }, /* for backward compatibility */ { "stop-exec-queue", no_argument, NULL, 's' }, { "start-exec-queue", no_argument, NULL, 'S' }, { "reload", no_argument, NULL, 'R' }, @@ -98,11 +99,11 @@ int control_main(int argc, char *argv[], void *userdata) { case 'l': r = log_level_from_string(optarg); if (r < 0) - return log_error_errno(r, "Failed to parse log priority '%s': %m", optarg); + return log_error_errno(r, "Failed to parse log level '%s': %m", optarg); r = udev_ctrl_send_set_log_level(uctrl, r); if (r == -ENOANO) - log_warning("Cannot specify --log-priority after --exit, ignoring."); + log_warning("Cannot specify --log-level after --exit, ignoring."); else if (r < 0) return log_error_errno(r, "Failed to send request to set log level: %m"); break; diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 22dad2acaf..d6415ad57e 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1050,7 +1050,7 @@ static int on_ctrl_msg(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, co switch (type) { case UDEV_CTRL_SET_LOG_LEVEL: - log_debug("Received udev control message (SET_LOG_LEVEL), setting log_priority=%i", value->intval); + log_debug("Received udev control message (SET_LOG_LEVEL), setting log_level=%i", value->intval); log_set_max_level_realm(LOG_REALM_UDEV, value->intval); log_set_max_level_realm(LOG_REALM_SYSTEMD, value->intval); manager_kill_workers(manager); @@ -1467,7 +1467,7 @@ static int listen_fds(int *ret_ctrl, int *ret_netlink) { /* * read the kernel command line, in case we need to get into debug mode - * udev.log_priority= syslog priority + * udev.log_level= syslog priority * udev.children_max= events are fully serialized if set to 1 * udev.exec_delay= delay execution of every executed program * udev.event_timeout= seconds to wait before terminating an event @@ -1478,7 +1478,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat assert(key); - if (proc_cmdline_key_streq(key, "udev.log_priority")) { + if (proc_cmdline_key_streq(key, "udev.log_level") || + proc_cmdline_key_streq(key, "udev.log_priority")) { /* kept for backward compatibility */ if (proc_cmdline_value_missing(key, value)) return 0; diff --git a/test/fuzz/fuzz-unit-file/directives.service b/test/fuzz/fuzz-unit-file/directives.service index 21a04cfba7..eebc89f5c2 100644 --- a/test/fuzz/fuzz-unit-file/directives.service +++ b/test/fuzz/fuzz-unit-file/directives.service @@ -297,7 +297,7 @@ rd.systemd.verity= rd.udev.children_max= rd.udev.event_timeout= rd.udev.exec_delay= -rd.udev.log_priority= +rd.udev.log_level= resume= resumeflags= root= @@ -331,7 +331,7 @@ systemd.watchdog_device= udev.children_max= udev.event_timeout= udev.exec_delay= -udev.log_priority= +udev.log_level= vconsole.font= vconsole.font_map= vconsole.font_unimap=