From b480afcabad0f0d92a7e99259a87f6f98af59fdd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2017 12:15:34 +0100 Subject: libblkid: add debug messages when ignore useless devices Signed-off-by: Karel Zak --- libblkid/src/superblocks/superblocks.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libblkid/src') diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c index 086003969..4387ab9e5 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)); -- cgit v1.2.3-55-g7522