Commit Graph

32 Commits

Author SHA1 Message Date
Karel Zak d58121a22a docs: update copyright years
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-05-31 18:12:07 +02:00
Karel Zak 248c239b27 libblkid: export blkid_probe_reset_hints()
* make hints persistent and do not call blkid_probe_reset_hints() in
  blkid_probe_set_device()
* export blkid_probe_reset_hints() by API to keep it completely in
  user's hands

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-11-09 11:42:58 +01:00
Karel Zak 67719fbbda 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>
2020-11-03 17:12:20 +01:00
Karel Zak bd64c5a3f1 libblkid: (docs) add missing references
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-07-22 10:33:44 +02:00
Karel Zak 487b55db54 libblkid: (docs) document new function
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-06-09 10:51:37 +02:00
Karel Zak 24cee7157a docs: update year in libs docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-01-06 12:59:45 +01:00
Ruediger Meier 73afd3f8e8 misc: fix typos using codespell
Some more funny typos, please review carefully.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:12:52 +01:00
Karel Zak d2b0c6587d 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>
2017-06-28 10:28:41 +02:00
Karel Zak ae4e2abcb1 libblkid: (docs) add missing 'since' tags
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-23 14:27:36 +02:00
Karel Zak ce59d8bfa5 Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6
  tests: Fix test output for low-probe-udf to contain UDF data
  Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
2017-05-11 10:59:14 +02:00
Pali Rohár ccfb5b0a1d Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
This reverts commit 8053b51c76.

Reporting meaningless ID_FS_LABEL=UDF_Volume written in that commit was
caused by reading wrong value for UDF label and it was fixed in commit
2f2730bc77.

So after this revert blkid reports for UDF filesystems label of UDF
filesystem and not label of ISO (if present) like other systems. In most
cases UDF and ISO labels are same (sometimes just one is upper case).

Commit 8053b51c76 just fixed result, not
reason why blkid reported different UDF Label as Windows. Real reason was
fixed in 2f2730bc77.
2017-05-05 18:38:15 +02:00
Sami Kerola 635d9aa5db
libblkid: add blkid_partitions_get_name()
This new function can be use to enquiry what partition names libblkid is
aware of.  First use of this information will be in partx(8) to make bash
completion to work without a magic list.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-02 23:22:04 +01:00
Karel Zak 76fab513b8 libblkid: add blkid_probe_set_sectorsize()
The usual way is to use ioctl to ask block device for sector size, but
this is useless for disk images (regular files). And the default
(512-bytes) may be pretty wrong for disk images from 4K disks. Let's
support a way how to specify proper sector size.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-01-13 13:26:37 +01:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Sebastian Rasmussen d35df4db5b docs: Fix various typos
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2016-05-31 23:40:21 +02:00
Karel Zak d5dbd57b22 docs: fix gtk-docs related warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-28 12:28:23 +02:00
Karel Zak 7a1c36ab38 docs: rename libs xml/version.xml to xml/version-utils.xml
It seems that gtk-docs stuff is confused when we use version.xml
(package version) and xml/version.xml (library version functions).

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-03 12:37:33 +02:00
Sami Kerola cc93d115de build-sys: sort gitignore files
Use 'LC_ALL=C sort -fu' order for all lists.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-12 12:06:37 +01:00
Karel Zak a3ebe0eca3 libblkid: add blkid_partlist_get_partition_by_partno()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-15 10:52:16 +01:00
Karel Zak 6ea595d996 libblkid: update docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-27 10:38:47 +02:00
Karel Zak 310f672874 libblkid: export blkid_init_debug()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 13:12:55 +02:00
Karel Zak 2029dbd9b1 docs: update year
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-15 15:18:22 +01:00
Karel Zak 2bb7a706a1 libblkid: clean up header file
* don't teach people C by header files, so use warn_unused_result
   attribute only on places where we return allocated memory (to avoid
   leaks in applications).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-15 14:59:02 +01:00
Karel Zak 9148b9bb47 libblkid: add blkid_probe_step_back to documentation
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-19 13:12:31 +01:00
Karel Zak 583120378d libblkid: return disk ID/UUID by PT binary interface
Add blkid_parttable_get_id() function.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-19 13:09:48 +01:00
Karel Zak 31a938ac38 build-sys: enable libmount and libblkid docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak 3fcf5e1b79 docs: update copyright years
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-22 13:07:14 +01:00
Karel Zak a0e3bbb815 libblkid: update docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-22 12:15:15 +01:00
Karel Zak 58ca4ed1b4 build-sys: remove and ignore generated files
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-28 13:47:56 +02:00
Karel Zak 3fe1b06aba build-sys: fix gtk-doc distclean
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-27 14:22:36 +02:00
Karel Zak fd7c9e3504 libblkid: update docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-23 00:15:56 +02:00
Karel Zak 8fb4efae6f build-sys: use top-level directory for libblkid rather than shlibs/blkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-09 22:04:24 +02:00