From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PpLJU-00034M-IU for barebox@lists.infradead.org; Tue, 15 Feb 2011 13:51:33 +0000 Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1PpLJR-00059i-9W for barebox@lists.infradead.org; Tue, 15 Feb 2011 14:51:29 +0100 From: Juergen Beisert Date: Tue, 15 Feb 2011 14:49:32 +0100 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201102151449.32123.jbe@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] Generic environment: Fix assembling of the 'mtdparts' variable To: barebox@lists.infradead.org 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 --- 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