Documentation ¶
Index ¶
- Constants
- type Device
- func (device Device) GetDevName() string
- func (device Device) GetDevType() string
- func (device Device) GetIDPath() string
- func (device Device) GetIDType() string
- func (device Device) GetShortName() string
- func (device Device) IsDisk() bool
- func (device Device) IsPartition() bool
- func (device Device) UpdateDiskFromUdev(disk *block.Disk)
- type Udev
Constants ¶
View Source
const ( // UdevSystem is used to filter devices other than disk which udev tracks (eg. CD ROM) UdevSystem = "disk" // UDevPartition is used to filter out partitions UdevPartition = "partition" // LinkNameIndex is used to get link index from dev link LinkNameIndex = 2 UdevDevname = "DEVNAME" UdevDevtype = "DEVTYPE" UdevFsUUID = "ID_FS_UUID" UdevIDPath = "ID_PATH" UdevModel = "ID_MODEL" UdevPartEntryType = "ID_PART_ENTRY_TYPE" UdevPartEntryUUID = "ID_PART_ENTRY_UUID" UdevPartTableType = "ID_PART_TABLE_TYPE" UdevPartTableUUID = "ID_PART_TABLE_UUID" UdevSerialNumber = "ID_SERIAL" UdevSerialShort = "ID_SERIAL_SHORT" UdevType = "ID_TYPE" UdevVendor = "ID_VENDOR" UdevWWN = "ID_WWN" )
key and env of udev uevent.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
func InitUdevDevice ¶
func (Device) GetDevName ¶
GetDevName returns the path of device in /dev directory
func (Device) GetDevType ¶
func (Device) GetShortName ¶
GetShortName returns the short device name of the /dev directory, e.g /dev/sda will return the name sda
func (Device) IsPartition ¶
IsPartition check if device is a partition
func (Device) UpdateDiskFromUdev ¶ added in v0.6.4
type Udev ¶
type Udev struct {
// contains filtered or unexported fields
}
func (*Udev) ActionHandler ¶
Click to show internal directories.
Click to hide internal directories.