Documentation ¶
Overview ¶
Package probe provides functions for probing block devices for things such as filesystems, and partions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DevForPartitionLabel ¶
func DevForPartitionLabel(devname, label string) (*blockdevice.BlockDevice, error)
DevForPartitionLabel finds and opens partition as a blockdevice.
func GetBlockDeviceWithPartitionName ¶
func GetBlockDeviceWithPartitionName(name string) (bd *blockdevice.BlockDevice, err error)
GetBlockDeviceWithPartitionName probes all known block device's partition table for a parition with the specified name.
Types ¶
type ProbedBlockDevice ¶
type ProbedBlockDevice struct { *blockdevice.BlockDevice SuperBlock filesystem.SuperBlocker Path string }
ProbedBlockDevice represents a probed block device.
func All ¶
func All(options ...SelectOption) (all []*ProbedBlockDevice, err error)
All probes a block device's file system for the given label.
type SelectOption ¶
type SelectOption func(device *ProbedBlockDevice) (bool, error)
SelectOption is a callback matcher for All block devices probes.
func WithPartitionLabel ¶
func WithPartitionLabel(label string) SelectOption
WithPartitionLabel search for a block device which has partitions with some specific label.
Click to show internal directories.
Click to hide internal directories.