]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: add debug messages when ignore useless devices
authorKarel Zak <kzak@redhat.com>
Thu, 7 Dec 2017 11:15:34 +0000 (12:15 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Dec 2017 11:15:48 +0000 (12:15 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/superblocks.c

index 08600396933e6ded0f9736288f095d0325b74ac2..4387ab9e57895acbfdc657da777a4e5ce6aa325e 100644 (file)
@@ -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));