9
0
Fork 0

Generic environment: Fix assembling of the 'mtdparts' variable

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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Juergen Beisert 2011-02-15 14:49:32 +01:00 committed by Sascha Hauer
parent 51cbd46d9d
commit 1194e279d6
1 changed files with 5 additions and 2 deletions

View File

@ -46,11 +46,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