mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] string: add skip_spaces support
@ 2011-01-27 13:02 Jean-Christophe PLAGNIOL-VILLARD
  2011-01-27 13:02 ` [PATCH 2/3] add command line boot support Jean-Christophe PLAGNIOL-VILLARD
  2011-01-27 13:02 ` [PATCH 3/3] cmdline: add section initsetup_calls to be able to discard them Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 2 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-01-27 13:02 UTC (permalink / raw)
  To: barebox; +Cc: Patrice Vilchez, Nicolas Ferre

need by parse_args for the command line parsing

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
---
 include/linux/string.h |    1 +
 lib/string.c           |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/linux/string.h b/include/linux/string.h
index 62d743e..b4b48fb 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -59,6 +59,7 @@ extern char * _strchr(const char *,int);
 #ifndef __HAVE_ARCH_STRRCHR
 extern char * _strrchr(const char *,int);
 #endif
+extern char * skip_spaces(const char *);
 #ifndef __HAVE_ARCH_STRSTR
 extern char * _strstr(const char *,const char *);
 #endif
diff --git a/lib/string.c b/lib/string.c
index 77435aa..5ffb861 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -214,6 +214,20 @@ char * _strrchr(const char * s, int c)
 #endif
 EXPORT_SYMBOL(_strrchr);
 
+/**
+ * skip_spaces - Removes leading whitespace from @str.
+ * @str: The string to be stripped.
+ *
+ * Returns a pointer to the first non-whitespace character in @str.
+ */
+char *skip_spaces(const char *str)
+{
+	while (isspace(*str))
+		++str;
+	return (char *)str;
+}
+EXPORT_SYMBOL(skip_spaces);
+
 #ifndef __HAVE_ARCH_STRLEN
 /**
  * strlen - Find the length of a string
-- 
1.7.2.3


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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [RFC] Boot command line support
@ 2011-01-26 16:43 Jean-Christophe PLAGNIOL-VILLARD
  2011-01-26 16:46 ` [PATCH 2/3] add command line boot support Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-01-26 16:43 UTC (permalink / raw)
  To: barebox

HI,

	as barebox is some times a second stage bootloader
	it could be intresting to pass some information

	I'm currently working on two support
	the atags for arm and the cmdline

	The cmline could be static or dynamic
	so it will be easy to customise a boot sequence and etc...

	this first patch will just add static cmdline

	later I'll send dynamic support and arm boot ABI

Best Regards,
J.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-27 13:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 13:02 [PATCH 1/3] string: add skip_spaces support Jean-Christophe PLAGNIOL-VILLARD
2011-01-27 13:02 ` [PATCH 2/3] add command line boot support Jean-Christophe PLAGNIOL-VILLARD
2011-01-27 13:02 ` [PATCH 3/3] cmdline: add section initsetup_calls to be able to discard them Jean-Christophe PLAGNIOL-VILLARD
  -- strict thread matches above, loose matches on Subject: below --
2011-01-26 16:43 [RFC] Boot command line 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox