summaryrefslogtreecommitdiffstats
path: root/libblkid/src/blkidP.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libblkid/src/blkidP.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/libblkid/src/blkidP.h b/libblkid/src/blkidP.h
index 007cc35..ea7d81b 100644
--- a/libblkid/src/blkidP.h
+++ b/libblkid/src/blkidP.h
@@ -146,6 +146,7 @@ struct blkid_idmag
{
const char *magic; /* magic string */
unsigned int len; /* length of magic */
+ unsigned int hint; /* hint for prober */
const char *hoff; /* hint which contains byte offset to kboff */
long kboff; /* kilobyte offset of superblock */
@@ -205,6 +206,7 @@ struct blkid_struct_probe
int fd; /* device file descriptor */
uint64_t off; /* begin of data on the device */
uint64_t size; /* end of data on the device */
+ uint64_t io_size; /* optimal size of IO */
dev_t devno; /* device number (st.st_rdev) */
dev_t disk_devno; /* devno of the whole-disk or 0 */
@@ -220,6 +222,7 @@ struct blkid_struct_probe
struct blkid_chain *wipe_chain; /* superblock, partition, ... */
struct list_head buffers; /* list of buffers */
+ struct list_head prunable_buffers; /* list of prunable buffers */
struct list_head hints;
struct blkid_chain chains[BLKID_NCHAINS]; /* array of chains */
@@ -412,12 +415,12 @@ extern int blkdid_probe_is_opal_locked(blkid_probe pr)
__attribute__((nonnull))
__attribute__((warn_unused_result));
-extern unsigned char *blkid_probe_get_buffer(blkid_probe pr,
+extern const unsigned char *blkid_probe_get_buffer(blkid_probe pr,
uint64_t off, uint64_t len)
__attribute__((nonnull))
__attribute__((warn_unused_result));
-extern unsigned char *blkid_probe_get_sector(blkid_probe pr, unsigned int sector)
+extern const unsigned char *blkid_probe_get_sector(blkid_probe pr, unsigned int sector)
__attribute__((nonnull))
__attribute__((warn_unused_result));
@@ -433,10 +436,15 @@ extern int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id,
uint64_t *offset, const struct blkid_idmag **res)
__attribute__((nonnull(1)));
+extern void blkid_probe_prune_buffers(blkid_probe pr);
+
/* returns superblock according to 'struct blkid_idmag' */
-extern unsigned char *blkid_probe_get_sb_buffer(blkid_probe pr, const struct blkid_idmag *mag, size_t size);
+extern const unsigned char *blkid_probe_get_sb_buffer(blkid_probe pr, const struct blkid_idmag *mag, size_t size);
#define blkid_probe_get_sb(_pr, _mag, type) \
- ((type *) blkid_probe_get_sb_buffer((_pr), _mag, sizeof(type)))
+ ((const type *) blkid_probe_get_sb_buffer((_pr), _mag, sizeof(type)))
+
+extern uint64_t blkid_probe_get_idmag_off(blkid_probe pr, const struct blkid_idmag *mag)
+ __attribute__((nonnull));
extern blkid_partlist blkid_probe_get_partlist(blkid_probe pr)
__attribute__((nonnull))