Struct blkid::BlkId
[−]
[src]
pub struct BlkId { /* fields omitted */ }
Methods
impl BlkId
[src]
pub fn new(file: &Path) -> Result<BlkId, BlkidError>
[src]
pub fn do_probe(&self) -> Result<(), BlkidError>
[src]
Calls probing functions in all enabled chains. The superblocks chain is enabled by default. The blkid_do_probe() stores result from only one probing function. It's necessary to call this routine in a loop to get results from all probing functions in all chains. The probing is reset by blkid_reset_probe() or by filter functions. This is string-based NAME=value interface only.
pub fn do_safe_probe(&self) -> Result<i32, BlkidError>
[src]
This function gathers probing results from all enabled chains and checks for ambivalent results (e.g. more filesystems on the device).
This is string-based NAME=value interface only.
Note about suberblocks chain -- the function does not check for filesystems when a RAID signature is detected. The function also does not check for collision between RAIDs. The first detected RAID is returned. The function checks for collision between partition table and RAID signature -- it's recommended to enable partitions chain together with superblocks chain. Returns Ok(0) on success, Ok(1) on success and nothing was detected, Ok(-2) if the probe was ambivalent.
pub fn lookup_value(&self, name: &str) -> Result<String, BlkidError>
[src]
pub fn has_value(&self, name: &str) -> Result<bool, BlkidError>
[src]
pub fn numof_values(&self) -> Result<i32, BlkidError>
[src]
number of values in probing result
pub fn get_value(&self, num: i32) -> Result<(String, String), BlkidError>
[src]
Retrieve the Nth item (Name, Value) in the probing result, (0..self.numof_values())
pub fn get_values_map(&self) -> Result<HashMap<String, String>, BlkidError>
[src]
Retrieve a HashMap of all the probed values
pub fn get_devno(&self) -> u64
[src]
pub fn get_wholedisk_devno(&self) -> u64
[src]
pub fn is_wholedisk(&self) -> Result<bool, BlkidError>
[src]
pub fn get_size(&self) -> Result<i64, BlkidError>
[src]
pub fn get_offset(&self) -> Result<i64, BlkidError>
[src]
pub fn get_sectorsize(&self) -> u32
[src]
pub fn get_sectors(&self) -> Result<i64, BlkidError>
[src]
pub fn get_fd(&self) -> Result<i32, BlkidError>
[src]
pub fn known_fstype(&self, fstype: &str) -> Result<bool, BlkidError>
[src]
pub fn enable_topology(&self) -> Result<(), BlkidError>
[src]
Enables/disables the topology probing for non-binary interface.
pub fn get_topology(&self) -> Result<blkid_topology, BlkidError>
[src]
This is a binary interface for topology values. See also blkid_topology_* functions. This function is independent on blkid_do_[safe,full]probe() and blkid_probe_enable_topology() calls. WARNING: the returned object will be overwritten by the next blkid_probe_get_topology() call for the same pr. If you want to use more blkid_topopogy objects in the same time you have to create more blkid_probe handlers (see blkid_new_probe()).
pub fn get_topology_alignment_offset(tp: blkid_topology) -> u64
[src]
alignment offset in bytes or 0.
pub fn get_topology_minimum_io_size(tp: blkid_topology) -> u64
[src]
minimum io size in bytes or 0.
pub fn get_topology_optimal_io_size(tp: blkid_topology) -> u64
[src]
optimal io size in bytes or 0.
pub fn get_topology_logical_sector_size(tp: blkid_topology) -> u64
[src]
logical sector size (BLKSSZGET ioctl) in bytes or 0.
pub fn get_topology_physical_sector_size(tp: blkid_topology) -> u64
[src]
logical sector size (BLKSSZGET ioctl) in bytes or 0.
pub fn enable_partitions(&self) -> Result<&Self, BlkidError>
[src]
Enables the partitions probing for non-binary interface.
pub fn set_partition_flags(&self, flags: u32) -> Result<&Self, BlkidError>
[src]
Sets probing flags to the partitions prober. This method is optional. BLKID_PARTS_* flags
pub fn enable_superblocks(&self) -> Result<&Self, BlkidError>
[src]
Enables the superblocks probing for non-binary interface.
pub fn set_superblock_flags(&self, flags: u32) -> Result<&Self, BlkidError>
[src]
Sets probing flags to the superblocks prober. This method is optional, the default are BLKID_SUBLKS_DEFAULTS flags. flags are BLKID_SUBLKS_* flags