*
* 'mtdparts' - partition list
*
- * mtdparts=mtdparts=<mtd-def>[;<mtd-def>...]
+ * mtdparts=[mtdparts=]<mtd-def>[;<mtd-def>...]
*
* <mtd-def> := <mtd-id>:<part-def>[,<part-def>...]
* <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)
*
* 1 NOR Flash, with 1 single writable partition:
* mtdids=nor0=edb7312-nor
- * mtdparts=mtdparts=edb7312-nor:-
+ * mtdparts=[mtdparts=]edb7312-nor:-
*
* 1 NOR Flash with 2 partitions, 1 NAND with one
* mtdids=nor0=edb7312-nor,nand0=edb7312-nand
- * mtdparts=mtdparts=edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
+ * mtdparts=[mtdparts=]edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
*
*/
return 0;
}
- strcpy(p, "mtdparts=");
- p += 9;
-
list_for_each(dentry, &devices) {
dev = list_entry(dentry, struct mtd_device, link);
if (!p)
p = mtdparts;
- if (strncmp(p, "mtdparts=", 9) != 0) {
- printf("mtdparts variable doesn't start with 'mtdparts='\n");
- return err;
- }
- p += 9;
+ /* Skip the useless prefix, if any */
+ if (strncmp(p, "mtdparts=", 9) == 0)
+ p += 9;
while (*p != '\0') {
err = 1;