From: Rafał Miłecki Date: Wed, 17 Dec 2014 17:47:04 +0000 (+0100) Subject: support UBI blocks (volumes) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=25a65a42bb0b2eb0b6c89b1803c703aadae8196b;p=project%2Ffstools.git support UBI blocks (volumes) We already had ubifs idinfo, so only /dev/ubiN_M support was missing. Signed-off-by: Rafał Miłecki --- diff --git a/block.c b/block.c index bba68c2..68cfd5a 100644 --- a/block.c +++ b/block.c @@ -481,6 +481,7 @@ static void cache_load(int mtd) if (mtd) { _cache_load("/dev/mtdblock*"); _cache_load("/dev/ubiblock*"); + _cache_load("/dev/ubi?*_?*"); } _cache_load("/dev/mmcblk*"); _cache_load("/dev/sd*"); diff --git a/libblkid-tiny/libblkid-tiny.c b/libblkid-tiny/libblkid-tiny.c index a01a43e..1e641f7 100644 --- a/libblkid-tiny/libblkid-tiny.c +++ b/libblkid-tiny/libblkid-tiny.c @@ -174,7 +174,7 @@ int probe_block(char *block, struct blkid_struct_probe *pr) struct stat s; int i; - if (stat(block, &s) || (!S_ISBLK(s.st_mode) && !S_ISREG(s.st_mode))) + if (stat(block, &s) || (!S_ISBLK(s.st_mode) && !S_ISREG(s.st_mode) && !strncmp(block, "ubi", 3))) return -1; pr->err = -1;