diff options
Diffstat (limited to 'arch/x86/kernel/setup.c')
| -rw-r--r-- | arch/x86/kernel/setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 9838f2539dfc..141efab52400 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 | ||
| 225 | static char __initdata command_line[COMMAND_LINE_SIZE]; | 225 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
| 226 | #ifdef CONFIG_CMDLINE_BOOL | ||
| 227 | static 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) |
| 228 | struct edd edd; | 231 | struct edd edd; |
| @@ -665,6 +668,19 @@ void __init setup_arch(char **cmdline_p) | |||
| 665 | bss_resource.start = virt_to_phys(&__bss_start); | 668 | bss_resource.start = virt_to_phys(&__bss_start); |
| 666 | bss_resource.end = virt_to_phys(&__bss_stop)-1; | 669 | bss_resource.end = virt_to_phys(&__bss_stop)-1; |
| 667 | 670 | ||
| 671 | #ifdef CONFIG_CMDLINE_BOOL | ||
| 672 | #ifdef CONFIG_CMDLINE_OVERRIDE | ||
| 673 | strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); | ||
| 674 | #else | ||
| 675 | if (builtin_cmdline[0]) { | ||
| 676 | /* append boot loader cmdline to builtin */ | ||
| 677 | strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE); | ||
| 678 | strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE); | ||
| 679 | strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); | ||
| 680 | } | ||
| 681 | #endif | ||
| 682 | #endif | ||
| 683 | |||
| 668 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | 684 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); |
| 669 | *cmdline_p = command_line; | 685 | *cmdline_p = command_line; |
| 670 | 686 | ||
