summaryrefslogtreecommitdiffstats
path: root/libblkid/src/probe.c
diff options
context:
space:
mode:
authorKarel Zak2014-01-16 16:38:30 +0100
committerKarel Zak2014-01-16 16:38:30 +0100
commitc93c20304ce544d2f8200540ccf25e08900b2e9d (patch)
tree1ab12bd528396ebac250e92048003f5e5c961b87 /libblkid/src/probe.c
parentwipefs: add comments to code (diff)
downloadkernel-qcow2-util-linux-c93c20304ce544d2f8200540ccf25e08900b2e9d.tar.gz
kernel-qcow2-util-linux-c93c20304ce544d2f8200540ccf25e08900b2e9d.tar.xz
kernel-qcow2-util-linux-c93c20304ce544d2f8200540ccf25e08900b2e9d.zip
libblkid: no more probe for btrfs backup superblock
* Linux kernel cares about the first superblock only * backup superblock are FS specific stuff and there is no reason to care about it in generic tools * the problem with broken btrfs utils has been already fixed (it was possible to use the utils on filesystem with erased primary superblok without any warning message). Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/probe.c')
-rw-r--r--libblkid/src/probe.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 4b0c99796..e20c61bb1 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -934,7 +934,8 @@ int blkid_do_probe(blkid_probe pr)
*
* This function erases the current signature detected by @pr. The @pr has to
* be open in O_RDWR mode, BLKID_SUBLKS_MAGIC or/and BLKID_PARTS_MAGIC flags
- * has to be enabled.
+ * has to be enabled (if you want to errase also superblock with broken check
+ * sums then use BLKID_SUBLKS_BADCSUM too).
*
* After successful signature removing the @pr prober will be moved one step
* back and the next blkid_do_probe() call will again call previously called
@@ -1135,8 +1136,6 @@ int blkid_do_safeprobe(blkid_probe pr)
blkid_probe_start(pr);
- pr->prob_flags |= BLKID_PROBE_FL_IGNORE_BACKUP;
-
for (i = 0; i < BLKID_NCHAINS; i++) {
struct blkid_chain *chn;
@@ -1809,8 +1808,3 @@ void blkid_probe_use_wiper(blkid_probe pr, blkid_loff_t off, blkid_loff_t size)
blkid_probe_chain_reset_vals(pr, chn);
}
}
-
-int blkid_probe_ignore_backup(blkid_probe pr)
-{
- return pr && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_BACKUP);
-}