summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-02-20 21:18:33 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-02-20 17:52:12 -0500
commitd8a953ddde5ec30a36810d0a892c3949b50849e9 (patch)
treeb2240798fc29aeb0907f54479173f5fca1d22271 /init
parent7ab215f22d04067094de8c81c20ba4c565ff8dd4 (diff)
downloadlinux-d8a953ddde5ec30a36810d0a892c3949b50849e9.tar.gz
linux-d8a953ddde5ec30a36810d0a892c3949b50849e9.tar.bz2
linux-d8a953ddde5ec30a36810d0a892c3949b50849e9.zip
bootconfig: Set CONFIG_BOOT_CONFIG=n by default
Set CONFIG_BOOT_CONFIG=n by default. This also warns user if CONFIG_BOOT_CONFIG=n but "bootconfig" is given in the kernel command line. Link: http://lkml.kernel.org/r/158220111291.26565.9036889083940367969.stgit@devnote2 Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig1
-rw-r--r--init/main.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 4a672c6629d0..f586878410d2 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1218,7 +1218,6 @@ endif
config BOOT_CONFIG
bool "Boot config support"
depends on BLK_DEV_INITRD
- default y
help
Extra boot config allows system admin to pass a config file as
complemental extension of kernel cmdline when booting.
diff --git a/init/main.c b/init/main.c
index 48c87f47a444..d96cc5f65022 100644
--- a/init/main.c
+++ b/init/main.c
@@ -418,6 +418,14 @@ not_found:
}
#else
#define setup_boot_config(cmdline) do { } while (0)
+
+static int __init warn_bootconfig(char *str)
+{
+ pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOTCONFIG is not set.\n");
+ return 0;
+}
+early_param("bootconfig", warn_bootconfig);
+
#endif
/* Change NUL term back to "=", to make "param" the whole string. */