]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: allow to hide already detected signatures
authorKarel Zak <kzak@redhat.com>
Fri, 26 May 2017 10:58:09 +0000 (12:58 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 28 Jun 2017 08:28:41 +0000 (10:28 +0200)
commitd2b0c6587d729a8e838821cb70d4de18c6969868
tree834756ba5d56eb7ebbf02e661a7962ec7fbed297
parent4fb515f90079739771b64dcb6beeb384e3be7cf5
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>
libblkid/docs/libblkid-sections.txt
libblkid/src/blkid.h.in
libblkid/src/blkidP.h
libblkid/src/libblkid.sym
libblkid/src/probe.c