aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 68b48e3fbcbd..2f31cddd27b7 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -223,6 +223,9 @@ unsigned long saved_video_mode;
223#define RAMDISK_LOAD_FLAG 0x4000 223#define RAMDISK_LOAD_FLAG 0x4000
224 224
225static char __initdata command_line[COMMAND_LINE_SIZE]; 225static char __initdata command_line[COMMAND_LINE_SIZE];
226#ifdef CONFIG_CMDLINE_BOOL
227static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
228#endif
226 229
227#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) 230#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
228struct edd edd; 231struct edd edd;
@@ -673,6 +676,19 @@ void __init setup_arch(char **cmdline_p)
673 bss_resource.start = virt_to_phys(&__bss_start); 676 bss_resource.start = virt_to_phys(&__bss_start);
674 bss_resource.end = virt_to_phys(&__bss_stop)-1; 677 bss_resource.end = virt_to_phys(&__bss_stop)-1;
675 678
679#ifdef CONFIG_CMDLINE_BOOL
680#ifdef CONFIG_CMDLINE_OVERRIDE
681 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
682#else
683 if (builtin_cmdline[0]) {
684 /* append boot loader cmdline to builtin */
685 strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
686 strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
687 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
688 }
689#endif
690#endif
691
676 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); 692 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
677 *cmdline_p = command_line; 693 *cmdline_p = command_line;
678 694