mtd: Be more strict on the "mtdparts=" prefix check
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 2 Dec 2018 09:54:27 +0000 (10:54 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 5 Dec 2018 19:15:36 +0000 (00:45 +0530)
commit429e048e4190b68b078c37c0012c59804e32818b
treec6882ff6c1d466b8f587ebb990fe63659f17ff63
parent96b06434e56ce5dca391e8417d293132ff7164e0
mtd: Be more strict on the "mtdparts=" prefix check

strstr() does not guarantee that the string we're searching for is
placed at the beginning. Use strncmp() instead.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Heiko Schocher <hs@denx.de>
drivers/mtd/mtd_uboot.c