summaryrefslogtreecommitdiff
path: root/src/basic/log.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-22 15:31:14 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-22 16:08:55 -0400
commitd7f69e16f1a5b84e9acf1771a9b53da3787ae79d (patch)
treeda87639bc4e1a491e266e8587a46dfbb8741cb39 /src/basic/log.c
parent92e724670f700d100b8cc8cbaea776b053be31ed (diff)
downloadsystemd-d7f69e16f1a5b84e9acf1771a9b53da3787ae79d.tar.gz
tree-wide: make parse_proc_cmdline() strip "rd." prefix automatically
This stripping is contolled by a new boolean parameter. When the parameter is true, it means that the caller does not care about the distinction between initrd and real root, and wants to act on both rd-dot-prefixed and unprefixed parameters in the initramfs, and only on the unprefixed parameters in real root. If the parameter is false, behaviour is the same as before. Changes by caller: log.c (systemd.log_*): changed to accept rd-dot-prefix params pid1: no change, custom logic cryptsetup-generator: no change, still accepts rd-dot-prefix params debug-generator: no change, does not accept rd-dot-prefix params fsck: changed to accept rd-dot-prefix params fstab-generator: no change, custom logic gpt-auto-generator: no change, custom logic hibernate-resume-generator: no change, does not accept rd-dot-prefix params journald: changed to accept rd-dot-prefix params modules-load: no change, still accepts rd-dot-prefix params quote-check: no change, does not accept rd-dot-prefix params udevd: no change, still accepts rd-dot-prefix params I added support for "rd." params in the three cases where I think it's useful: logging, fsck options, journald forwarding options.
Diffstat (limited to 'src/basic/log.c')
-rw-r--r--src/basic/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index 40f342ca72..2ff70be255 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -1012,7 +1012,7 @@ void log_parse_environment(void) {
/* Only try to read the command line in daemons.
We assume that anything that has a controlling
tty is user stuff. */
- (void) parse_proc_cmdline(parse_proc_cmdline_item, NULL);
+ (void) parse_proc_cmdline(parse_proc_cmdline_item, NULL, true);
e = secure_getenv("SYSTEMD_LOG_TARGET");
if (e && log_set_target_from_string(e) < 0)