mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] __setup test
Date: Wed, 26 Jan 2011 17:46:04 +0100	[thread overview]
Message-ID: <1296060364-23113-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20110126164348.GF1441@game.jcrosoft.org>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/startup.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/common/startup.c b/common/startup.c
index 98b4aab..1891cbd 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -105,12 +105,20 @@ device_initcall(register_default_env);
 #endif
 
 #ifdef CONFIG_BOOT_CMDLINE
-static int __init bootmode(char *mode)
+static __initdata char bootmode[COMMAND_LINE_SIZE];
+
+static int __init setup_bootmode(char *mode)
+{
+	strcpy(bootmode, mode);
+	return 0;
+}
+__setup("boot=", setup_bootmode);
+static int bootmode_print(void)
 {
-	printf("boot=%s\n", mode);
+	printf("boot=%s\n", bootmode);
 	return 0;
 }
-__setup("boot=", bootmode);
+device_initcall(bootmode_print);
 #endif
 
 static int mount_root(void)
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2011-01-26 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 16:43 [RFC] Boot command line support Jean-Christophe PLAGNIOL-VILLARD
2011-01-26 16:46 ` [PATCH 1/3] string: add skip_spaces support Jean-Christophe PLAGNIOL-VILLARD
2011-01-26 16:46 ` [PATCH 2/3] add command line boot support Jean-Christophe PLAGNIOL-VILLARD
2011-01-27  9:20   ` Sascha Hauer
2011-01-27 11:55     ` Jean-Christophe PLAGNIOL-VILLARD
2011-01-27 13:10       ` Sascha Hauer
2011-01-27 13:15         ` Jean-Christophe PLAGNIOL-VILLARD
2011-01-26 16:46 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2014-02-07 11:04 ` [RFC] Boot command line support Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296060364-23113-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox