From: Shmulik Ladkani Date: Wed, 5 Sep 2012 05:30:20 +0000 (+0300) Subject: mtd: cmdlinepart: make the partitions rule more strict X-Git-Tag: v3.7-rc1~70^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7baf04261062826ea225ab23e07c541e279143fa;p=pandora-kernel.git mtd: cmdlinepart: make the partitions rule more strict Huang Shijie explains: Assume we have a 1GiB(8Gib) NAND chip, and we set the partitions in the command line like this: #gpmi-nand:100m(boot),100m(kernel),1g(rootfs) In this case, the partition truncating occurs. The current code will get the following result: ---------------------------------- root@freescale ~$ cat /proc/mtd dev: size erasesize name mtd0: 06400000 00040000 "boot" mtd1: 06400000 00040000 "kernel" ---------------------------------- It is obvious that we lost the truncated partition `rootfs` which should be 824MiB in this case. Also, forbid 0-sized partitions. Signed-off-by: Shmulik Ladkani Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed