From: Lennart Poettering Date: Thu, 19 Jun 2014 14:55:20 +0000 (+0200) Subject: stop complaining about unknown kernel cmdline options X-Git-Tag: v215~293 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8501384436b410cb9f5929ef6873c59fac6254be;hp=52c611b776c6d17b7aeffb5d9b1b555260b5011b stop complaining about unknown kernel cmdline options Also stop warning about unknown kernel cmdline options in the various tools, not just in PID 1 --- diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index dfdca1e47..9530e44bd 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -291,8 +291,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { if (!arg_keyfile) return log_oom(); - } else if (startswith(key, "luks.") || startswith(key, "rd.luks.")) - log_warning("Unknown kernel switch %s. Ignoring.", key); + } return 0; } diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c index cb2f5734e..0b572e59f 100644 --- a/src/fsck/fsck.c +++ b/src/fsck/fsck.c @@ -86,7 +86,8 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { else if (streq(value, "skip")) arg_skip = true; else - log_warning("Invalid fsck.mode= parameter. Ignoring."); + log_warning("Invalid fsck.mode= parameter '%s'. Ignoring.", value); + } else if (streq(key, "fsck.repair") && value) { if (streq(value, "preen")) @@ -96,13 +97,14 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { else if (streq(value, "no")) arg_repair = "-n"; else - log_warning("Invalid fsck.repair= parameter. Ignoring."); - } else if (startswith(key, "fsck.")) - log_warning("Invalid fsck parameter. Ignoring."); + log_warning("Invalid fsck.repair= parameter '%s'. Ignoring.", value); + } + #ifdef HAVE_SYSV_COMPAT else if (streq(key, "fastboot") && !value) { log_warning("Please pass 'fsck.mode=skip' rather than 'fastboot' on the kernel command line."); arg_skip = true; + } else if (streq(key, "forcefsck") && !value) { log_warning("Please pass 'fsck.mode=force' rather than 'forcefsck' on the kernel command line."); arg_force = true; @@ -113,6 +115,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { } static void test_files(void) { + #ifdef HAVE_SYSV_COMPAT if (access("/fastboot", F_OK) >= 0) { log_error("Please pass 'fsck.mode=skip' on the kernel command line rather than creating /fastboot on the root file system."); diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index a9a5c0203..63c36b5f9 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -486,8 +486,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { arg_root_rw = true; else if (streq(key, "ro") && !value) arg_root_rw = false; - else if (startswith(key, "fstab.") || startswith(key, "rd.fstab.")) - log_warning("Unknown kernel switch %s. Ignoring.", key); return 0; } diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 78643c9a3..7dcbbfe49 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -695,8 +695,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { arg_root_rw = true; else if (streq(key, "ro") && !value) arg_root_rw = false; - else if (startswith(key, "systemd.gpt-auto.") || startswith(key, "rd.systemd.gpt-auto.")) - log_warning("Unknown kernel switch %s. Ignoring.", key); return 0; } diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c index efd6e1830..ed95b48c6 100644 --- a/src/quotacheck/quotacheck.c +++ b/src/quotacheck/quotacheck.c @@ -42,10 +42,9 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { else if (streq(value, "skip")) arg_skip = true; else - log_warning("Invalid quotacheck.mode= parameter. Ignoring."); + log_warning("Invalid quotacheck.mode= parameter '%s'. Ignoring.", value); + } - } else if (startswith(key, "quotacheck.")) - log_warning("Invalid quotacheck parameter. Ignoring."); #ifdef HAVE_SYSV_COMPAT else if (streq(key, "forcequotacheck") && !value) { log_warning("Please use 'quotacheck.mode=force' rather than 'forcequotacheck' on the kernel command line."); @@ -57,6 +56,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value) { } static void test_files(void) { + #ifdef HAVE_SYSV_COMPAT if (access("/forcequotacheck", F_OK) >= 0) { log_error("Please pass 'quotacheck.mode=force' on the kernel command line rather than creating /forcequotacheck on the root file system.");