Commits
Huang Shijie committed ec6ff73b552
ENGR00279980 ubi: attach: do not return -EINVAL if the mtd->numeraseregions is 1 If the master mtd does not have any slave mtd partitions, and its numeraseregions is one(only has one erease block), and we attach the master mtd with : ubiattach -m 0 -d 0 We will meet the error: ------------------------------------------------------- root@freescale ~$ ubiattach /dev/ubi_ctrl -m 0 -d 0 UBI: attaching mtd0 to ubi0 UBI error: io_init: multiple regions, not implemented ubiattach: error!: cannot attach mtd0 error 22 (Invalid argument) ------------------------------------------------------- In fact, if there is only one "erase block", we should not prevent the attach. This patch fixes it. Signed-off-by: Huang Shijie <b32955@freescale.com> (cherry picked from commit 361cdc47fc4c4db31c5485560cdabd94f409bd81) (cherry picked from commit ebee7d74914fad3cf7223af84496811c9d2488a1) Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com> Signed-off-by: Han Xu <han.xu@nxp.com>