mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Generic environment: Fix assembling of the 'mtdparts' variable
@ 2011-02-15 13:49 Juergen Beisert
  0 siblings, 0 replies; only message in thread
From: Juergen Beisert @ 2011-02-15 13:49 UTC (permalink / raw)
  To: barebox

The semicolon is a delimiter, not an end marker. With a trailing semicolon the
kernel give the confusing message:

mtd: no mtd-id

With this patch, a semicolon gets added on demand only.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

---
 defaultenv/bin/boot |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: barebox-2011.01.0/defaultenv/bin/boot
===================================================================
--- barebox-2011.01.0.orig/defaultenv/bin/boot
+++ barebox-2011.01.0/defaultenv/bin/boot
@@ -43,11 +43,14 @@ else
 fi
 
 if [ -n $nor_parts ]; then
-	mtdparts="${mtdparts}physmap-flash.0:${nor_parts};"
+	mtdparts="${mtdparts}physmap-flash.0:${nor_parts}"
 fi
 
 if [ -n $nand_parts ]; then
-	mtdparts="${mtdparts}${nand_device}:${nand_parts};"
+	if [ -n ${mtdparts} ]; then
+		mtdparts="${mtdparts};"
+	fi
+	mtdparts="${mtdparts}${nand_device}:${nand_parts}"
 fi
 
 if [ -n $mtdparts ]; then

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-15 13:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 13:49 [PATCH] Generic environment: Fix assembling of the 'mtdparts' variable Juergen Beisert

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