]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: add blkid_probe_{set,get}_hint()
authorKarel Zak <kzak@redhat.com>
Tue, 3 Nov 2020 16:06:09 +0000 (17:06 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Nov 2020 16:12:20 +0000 (17:12 +0100)
commit67719fbbda6de60c63496e62dae8617336f9ac7b
tree1ea0686d3f7f60e9957bf58917a3a54e1252a71d
parent1ab5f9b70555b113891cd0e283eae62631692b68
libblkid: add blkid_probe_{set,get}_hint()

Add new API for additional probing hints (offsets). The idea is that
probing function can optionally use the hint to detect superblock or
partition table if on unusual place where the library does not expects (etc.)

The hints use strings as identifiers (e.g. "last-medium-session") to
make it extendable and prober specific (if necessary). The function
blkid_probe_set_hint() always add a new hint, so you can specify more
offsets with the same (hint) name.

The function blkid_probe_get_hint() is not public. For now it returns
the first hint only.

Addresses: https://github.com/karelzak/util-linux/issues/1161
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