]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: add debug messages for "idmag" stuff and btrfs
authorKarel Zak <kzak@redhat.com>
Wed, 20 Feb 2013 09:43:30 +0000 (10:43 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Feb 2013 09:43:30 +0000 (10:43 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c
libblkid/src/superblocks/btrfs.c

index e0ac8ebac722e88fb8403d3f9a5e98b781f451a9..77e8b860c870eb4c8b33af31d0a12abae55ee76e 100644 (file)
@@ -815,6 +815,7 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id,
 static inline void blkid_probe_start(blkid_probe pr)
 {
        if (pr) {
+               DBG(DEBUG_LOWPROBE, printf("%p: start probe\n", pr));
                pr->cur_chain = NULL;
                pr->prob_flags = 0;
                blkid_probe_set_wiper(pr, 0, 0);
@@ -824,6 +825,7 @@ static inline void blkid_probe_start(blkid_probe pr)
 static inline void blkid_probe_end(blkid_probe pr)
 {
        if (pr) {
+               DBG(DEBUG_LOWPROBE, printf("%p: end probe\n", pr));
                pr->cur_chain = NULL;
                pr->prob_flags = 0;
                blkid_probe_set_wiper(pr, 0, 0);
index 552097b9791f7a626cb93ce9298139708d35255f..5813035f3f4465334f09399055963199f227fc62 100644 (file)
@@ -63,8 +63,10 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag)
 {
        struct btrfs_super_block *bfs;
 
-       if (mag->kboff > 64 && blkid_probe_ignore_backup(pr))
+       if (mag->kboff > 64 && blkid_probe_ignore_backup(pr)) {
+               DBG(DEBUG_LOWPROBE, printf("btrfs: found backup superblock, ignore\n"));
                return 1;
+       }
 
        bfs = blkid_probe_get_sb(pr, mag, struct btrfs_super_block);
        if (!bfs)