util-linux/libblkid
Karel Zak cd0fe5c165 libblkid: add blkid_probe_step_back()
It seems that blkid_do_probe() is too high-level solution for some
mkfs programs (for example ext4 mkfs supports "undo" so all write
operations has to be implemented by filesystem specific functions).

The new function blkid_probe_step_back() resets internal libblkid
buffers and move probing stuff one step back. It means that the
previously used probing function will be called again in the next
blkid_do_probe() call. This allows to modify on-disk data and check
for backup superblocks or alternative magic strings. Something like:

  while (blkid_do_probe(pr) == 0) {
    ... get SBMAGIC_OFFSET and SBMAGIC len ...
    ... use your private seek & write() ...

    blkid_probe_step_back(pr);
  }

References: https://bugzilla.redhat.com/show_bug.cgi?id=902512
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-04 11:28:09 +01:00
..
docs build-sys: enable libmount and libblkid docs 2012-06-26 20:50:54 +02:00
samples build-sys: move tests to check_PROGRAMS 2012-07-30 17:59:16 +02:00
src libblkid: add blkid_probe_step_back() 2013-02-04 11:28:09 +01:00
COPYING docs: use .LGPL extension for file with GNU Lesser License 2011-08-31 11:12:17 +02:00
Makemodule.am build-sys: expand paths at make time 2012-08-15 02:06:53 +02:00
blkid.pc.in build-sys: use top-level directory for libblkid rather than shlibs/blkid 2011-06-09 22:04:24 +02:00
libblkid.3 libblkid: fix copyright noticed to be consistent (so all are LGPL) 2012-09-11 09:30:16 +02:00