mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] Generic environment: Fix assembling of the 'mtdparts' variable
Date: Tue, 15 Feb 2011 14:49:32 +0100	[thread overview]
Message-ID: <201102151449.32123.jbe@pengutronix.de> (raw)

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

                 reply	other threads:[~2011-02-15 13:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201102151449.32123.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --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