From: Karel Zak Date: Thu, 7 Dec 2017 11:15:34 +0000 (+0100) Subject: libblkid: add debug messages when ignore useless devices X-Git-Tag: v2.32-rc1~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b480afcabad0f0d92a7e99259a87f6f98af59fdd;p=thirdparty%2Futil-linux.git libblkid: add debug messages when ignore useless devices Signed-off-by: Karel Zak --- diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c index 0860039693..4387ab9e57 100644 --- a/libblkid/src/superblocks/superblocks.c +++ b/libblkid/src/superblocks/superblocks.c @@ -341,14 +341,18 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn) blkid_probe_chain_reset_values(pr, chn); - if (pr->flags & BLKID_FL_NOSCAN_DEV) + if (pr->flags & BLKID_FL_NOSCAN_DEV) { + DBG(LOWPROBE, ul_debug("*** ignore (noscan flag)")); return BLKID_PROBE_NONE; + } - if (pr->size <= 0 || (pr->size <= 1024 && !S_ISCHR(pr->mode))) + if (pr->size <= 0 || (pr->size <= 1024 && !S_ISCHR(pr->mode))) { /* Ignore very very small block devices or regular files (e.g. * extended partitions). Note that size of the UBI char devices * is 1 byte */ + DBG(LOWPROBE, ul_debug("*** ignore (size <= 1024)")); return BLKID_PROBE_NONE; + } DBG(LOWPROBE, ul_debug("--> starting probing loop [SUBLKS idx=%d]", chn->idx));