From 25a65a42bb0b2eb0b6c89b1803c703aadae8196b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 17 Dec 2014 18:47:04 +0100 Subject: [PATCH] support UBI blocks (volumes) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We already had ubifs idinfo, so only /dev/ubiN_M support was missing. Signed-off-by: Rafał Miłecki --- block.c | 1 + libblkid-tiny/libblkid-tiny.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- 2.25.1