summaryrefslogtreecommitdiffstats
path: root/libblkid/src/blkidP.h
diff options
context:
space:
mode:
authorKarel Zak2017-05-26 12:58:09 +0200
committerKarel Zak2017-06-28 10:28:41 +0200
commitd2b0c6587d729a8e838821cb70d4de18c6969868 (patch)
tree834756ba5d56eb7ebbf02e661a7962ec7fbed297 /libblkid/src/blkidP.h
parentsetpriv: add --ambient-caps to usage() (diff)
downloadkernel-qcow2-util-linux-d2b0c6587d729a8e838821cb70d4de18c6969868.tar.gz
kernel-qcow2-util-linux-d2b0c6587d729a8e838821cb70d4de18c6969868.tar.xz
kernel-qcow2-util-linux-d2b0c6587d729a8e838821cb70d4de18c6969868.zip
libblkid: allow to hide already detected signatures
The libblkid probing functions returns the first successful result of the filesystem/RAID/PT. Unfortunately, some signatures is possible to detect by more ways or device may contains more copies (e.g. GPT). This is no problem when we wipe signatures from the device. In this case we zeroize on-device signature and re-scan for the signature (by blkid_probe_step_back()). The problem is if we want to read all permutations without the device modification (for example wipefs(8) dry run). This patch add blkid_probe_hide_range(). The function remove (zeroize) specified signature from in-memory cached buffers. If the buffer is later re-used by probing functions then the signature is invisible and we can try detect another variant of the magic string. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/blkidP.h')
-rw-r--r--libblkid/src/blkidP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h
index 4a148357a..c79132773 100644
--- a/libblkid/src/blkidP.h
+++ b/libblkid/src/blkidP.h
@@ -215,6 +215,7 @@ struct blkid_struct_probe
#define BLKID_FL_TINY_DEV (1 << 2) /* <= 1.47MiB (floppy or so) */
#define BLKID_FL_CDROM_DEV (1 << 3) /* is a CD/DVD drive */
#define BLKID_FL_NOSCAN_DEV (1 << 4) /* do not scan this device */
+#define BLKID_FL_MODIF_BUFF (1 << 5) /* cached bufferes has been modified */
/* private per-probing flags */
#define BLKID_PROBE_FL_IGNORE_PT (1 << 1) /* ignore partition table */