diff options
author | Karel Zak | 2009-09-15 22:55:05 +0200 |
---|---|---|
committer | Karel Zak | 2009-09-16 10:57:24 +0200 |
commit | ce011388e1e7afa16b8051cdb870ebd9064017d5 (patch) | |
tree | 4abf865e2eabaf112ac4c679269a4a3058212e93 /shlibs/blkid/src/probe.c | |
parent | libblkid: allow to change dimension of probing area (diff) | |
download | kernel-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.c | 7 |
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) { |