extern dev_t blkid_probe_get_devno(blkid_probe pr);
extern blkid_loff_t blkid_probe_get_size(blkid_probe pr);
+extern blkid_loff_t blkid_probe_get_offset(blkid_probe pr);
extern unsigned int blkid_probe_get_sectorsize(blkid_probe pr);
+extern int blkid_probe_get_fd(blkid_probe pr);
+
/*
* superblocks probing
*/
*/
BLKID_2.18 {
global:
- blkid_probe_all_removable;
- blkid_partlist_devno_to_partition;
blkid_partition_get_flags;
+ blkid_partlist_devno_to_partition;
+ blkid_probe_all_removable;
+ blkid_probe_get_fd;
+ blkid_probe_get_offset;
} BLKID_2.17;
return pr ? pr->size : -1;
}
+/**
+ * blkid_probe_get_offset:
+ * @pr: probe
+ *
+ * This function returns offset of probing area as defined by blkid_probe_set_device().
+ *
+ * Returns: offset in bytes or -1 in case of error.
+ */
+blkid_loff_t blkid_probe_get_offset(blkid_probe pr)
+{
+ return pr ? pr->off : -1;
+}
+
+/**
+ * blkid_probe_get_fd:
+ * @pr: probe
+ *
+ * Returns: file descriptor for assigned device/file.
+ */
+int blkid_probe_get_fd(blkid_probe pr)
+{
+ return pr ? pr->fd : -1;
+}
+
/**
* blkid_probe_get_sectorsize:
* @pr: probe