Documentation ¶
Overview ¶
Implementation included in this file was written with the aim of easing integration with the interface exposed at /sys/class/block. It assumes sysfs is already mounted at /sys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDevNotFound = errors.New("device not found")
Functions ¶
func DeviceByPartUUID ¶
DeviceByPartUUID returns a block device name, given its corresponding partition UUID.
func ParentBlockDevice ¶
ParentBlockDevice transforms the block device name of a partition, eg "sda1", to the name of the block device hosting it, eg "sda".
func PartUUIDMap ¶
PartUUIDMap returns a mapping between partition UUIDs and block device names based on information exposed by uevent. UUID keys of the returned map are represented as lowercase strings.
func PartitionBlockDevice ¶
PartitionBlockDevice returns the name of a block device associated with the partition at index in the containing block device dev, eg "nvme0n1pN" for "nvme0n1" or "sdaN" for "sda".
Types ¶
This section is empty.