From: Daniel Golle Date: Wed, 20 Jul 2016 23:57:50 +0000 (+0200) Subject: block: allow block info /dev/ubi?_? X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a8fae38791572d72d4241856b5704684a8ee7c6;p=oweals%2Ffstools.git block: allow block info /dev/ubi?_? Allow querying /dev/ubi?_? devices though they are not block devices. Signed-off-by: Daniel Golle --- 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; }