aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/setup.c
diff options
context:
space:
mode:
authorVictor Boivie <victor.boivie@sonyericsson.com>2011-05-04 12:07:55 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-12 05:13:22 -0400
commit4394c1244249198c6b85093d46935b761b36ae05 (patch)
tree3a0c30dc915b85ee5b2190eaa3ed2c6ad530aab0 /arch/arm/kernel/setup.c
parentc1b0db56604b4ccc55a325104b14093aeedeb829 (diff)
ARM: 6893/1: Allow for kernel command line concatenation
This patch allows the provided CONFIG_CMDLINE to be concatenated with the one provided by the boot loader. This is useful to merge the static values defined in CONFIG_CMDLINE with the boot loader's (possibly) more dynamic values, such as startup reasons and more. Signed-off-by: Victor Boivie <victor.boivie@sonyericsson.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@sonyericsson.com> Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r--arch/arm/kernel/setup.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 006c1e884eaf..6dce209a623b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -672,11 +672,16 @@ __tagtable(ATAG_REVISION, parse_tag_revision);
672 672
673static int __init parse_tag_cmdline(const struct tag *tag) 673static int __init parse_tag_cmdline(const struct tag *tag)
674{ 674{
675#ifndef CONFIG_CMDLINE_FORCE 675#if defined(CONFIG_CMDLINE_EXTEND)
676 strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); 676 strlcat(default_command_line, " ", COMMAND_LINE_SIZE);
677#else 677 strlcat(default_command_line, tag->u.cmdline.cmdline,
678 COMMAND_LINE_SIZE);
679#elif defined(CONFIG_CMDLINE_FORCE)
678 pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); 680 pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");
679#endif /* CONFIG_CMDLINE_FORCE */ 681#else
682 strlcpy(default_command_line, tag->u.cmdline.cmdline,
683 COMMAND_LINE_SIZE);
684#endif
680 return 0; 685 return 0;
681} 686}
682 687