summaryrefslogtreecommitdiffstats
path: root/shlibs/blkid/src/probe.c
diff options
context:
space:
mode:
authorKarel Zak2009-09-15 22:55:05 +0200
committerKarel Zak2009-09-16 10:57:24 +0200
commitce011388e1e7afa16b8051cdb870ebd9064017d5 (patch)
tree4abf865e2eabaf112ac4c679269a4a3058212e93 /shlibs/blkid/src/probe.c
parentlibblkid: allow to change dimension of probing area (diff)
downloadkernel-qcow2-util-linux-ce011388e1e7afa16b8051cdb870ebd9064017d5.tar.gz
kernel-qcow2-util-linux-ce011388e1e7afa16b8051cdb870ebd9064017d5.tar.xz
kernel-qcow2-util-linux-ce011388e1e7afa16b8051cdb870ebd9064017d5.zip
libblkid: allow to read in sectors
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/probe.c')
-rw-r--r--shlibs/blkid/src/probe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c
index d3da7165b..b72bcb40a 100644
--- a/shlibs/blkid/src/probe.c
+++ b/shlibs/blkid/src/probe.c
@@ -720,6 +720,13 @@ done:
return count ? 0 : 1;
}
+/* same sa blkid_probe_get_buffer() but works with 512-sectors */
+unsigned char *blkid_probe_get_sector(blkid_probe pr, unsigned int sector)
+{
+ return pr ? blkid_probe_get_buffer(pr,
+ ((blkid_loff_t) sector) << 9, 0x200) : NULL;
+}
+
struct blkid_prval *blkid_probe_assign_value(
blkid_probe pr, const char *name)
{