block: allow block info /dev/ubi?_?
[project/fstools.git] / block.c
diff --git a/block.c b/block.c
index 6c025fdce4963eb6169a37517637d9ee6873dde4..85c5b586f5aed62db2bed1c8c64da4c1ec85b7b1 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1277,7 +1277,7 @@ static int main_info(int argc, char **argv)
                        ULOG_ERR("failed to stat %s\n", argv[i]);
                        continue;
                }
-               if (!S_ISBLK(s.st_mode)) {
+               if (!S_ISBLK(s.st_mode) && !(S_ISCHR(s.st_mode) && major(s.st_rdev) == 250)) {
                        ULOG_ERR("%s is not a block device\n", argv[i]);
                        continue;
                }