diff options
author | Karel Zak | 2008-09-18 13:15:21 +0200 |
---|---|---|
committer | Karel Zak | 2009-02-11 23:21:45 +0100 |
commit | 148e2f9e3e9bded02ad5bdca711c34d0fd0a1a26 (patch) | |
tree | 2bf796f95bea7586bd93b7bc3aea76ea20ea1fb4 /libs/blkid/src/blkidP.h | |
parent | blkid: add jfs (diff) | |
download | kernel-qcow2-util-linux-148e2f9e3e9bded02ad5bdca711c34d0fd0a1a26.tar.gz kernel-qcow2-util-linux-148e2f9e3e9bded02ad5bdca711c34d0fd0a1a26.tar.xz kernel-qcow2-util-linux-148e2f9e3e9bded02ad5bdca711c34d0fd0a1a26.zip |
blkid: add blkid_probe_get_sb() macro
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libs/blkid/src/blkidP.h')
-rw-r--r-- | libs/blkid/src/blkidP.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/blkid/src/blkidP.h b/libs/blkid/src/blkidP.h index 56e569f3e..e32d7dcde 100644 --- a/libs/blkid/src/blkidP.h +++ b/libs/blkid/src/blkidP.h @@ -95,7 +95,7 @@ struct blkid_struct_probe size_t sbbuf_len; /* size of data in superblock buffer */ unsigned char *buf; /* seek buffer */ - off_t buf_off; /* offset of seek buffer */ + blkid_loff_t buf_off; /* offset of seek buffer */ size_t buf_len; /* size of data in seek buffer */ size_t buf_max; /* allocated size of seek buffer */ @@ -250,6 +250,11 @@ extern void blkid_free_dev(blkid_dev dev); /* probe.c */ unsigned char *blkid_probe_get_buffer(blkid_probe pr, blkid_loff_t off, blkid_loff_t len); + +#define blkid_probe_get_sb(_pr, _mag, type) \ + ((type *) blkid_probe_get_buffer((_pr),\ + (_mag)->kboff << 10, sizeof(type))) + extern int blkid_probe_set_value(blkid_probe pr, const char *name, unsigned char *data, size_t len); extern int blkid_probe_vsprintf_value(blkid_probe pr, const char *name, |