From 6a8fae38791572d72d4241856b5704684a8ee7c6 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 21 Jul 2016 01:57:50 +0200
Subject: [PATCH] block: allow block info /dev/ubi?_?

Allow querying /dev/ubi?_? devices though they are not block devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block.c b/block.c
index 6c025fd..85c5b58 100644
--- 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;
 		}
-- 
2.25.1