[OpenWrt-Devel] [PATCH fstools] support UBI blocks (volumes)
Rafał Miłecki
zajec5 at gmail.com
Wed Dec 17 12:47:04 EST 2014
We already had ubifs idinfo, so only /dev/ubiN_M support was missing.
Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
---
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;
--
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list