From cc526b9dd7471270dae586433ec610760df54cc0 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 9 Apr 2015 22:53:59 +0200 Subject: [PATCH] make sure to also scan for leading and ending " when looking for mtd devices Signed-off-by: John Crispin --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index a3db87b..aecf366 100644 --- a/block.c +++ b/block.c @@ -969,7 +969,7 @@ static int check_extroot(char *path) char devpath[32]; #ifdef UBIFS_EXTROOT - if (find_block_mtd("rootfs", devpath, sizeof(devpath))) { + if (find_block_mtd("\"rootfs\"", devpath, sizeof(devpath))) { int err = -1; libubi_t libubi; @@ -980,7 +980,7 @@ static int check_extroot(char *path) return -1; } #else - if (find_block_mtd("rootfs", devpath, sizeof(devpath))) { + if (find_block_mtd("\"rootfs\"", devpath, sizeof(devpath))) { if (find_root_dev(devpath, sizeof(devpath))) { ULOG_ERR("extroot: unable to determine root device\n"); return -1; @@ -1142,7 +1142,7 @@ static int main_extroot(int argc, char **argv) */ /* Start with looking for MTD partition */ - find_block_mtd("rootfs_data", blkdev_path, sizeof(blkdev_path)); + find_block_mtd("\"rootfs_data\"", blkdev_path, sizeof(blkdev_path)); if (blkdev_path[0]) { pr = find_block_info(NULL, NULL, blkdev_path); if (pr && !strcmp(pr->id->name, "jffs2")) { -- 2.11.0