summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-07-21 01:57:50 +0200
committerDaniel Golle <daniel@makrotopia.org>2016-07-21 02:30:56 +0200
commit6a8fae38791572d72d4241856b5704684a8ee7c6 (patch)
tree08289252117af1fdf4c38a215ab38bdae1e56c18
parentb98642a50b0cd11696eaad151638f8cf9d153c40 (diff)
downloadfstools-6a8fae38791572d72d4241856b5704684a8ee7c6.tar.gz
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>
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
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;
}