Skip to main content

Module hardware

Module hardware 

Source

Structs§

HardwareDevice
HardwareDeviceKey

Enums§

HardwareCategory
KeyError
NicknameError

Constants§

NICKNAME_MAX_CHARS

Functions§

compute_device_label
Compute the display label for a single device given the full device list + nickname map. The rule:
parse_sysfs_pci_id
Parse a sysfs PCI ID file (/sys/.../device/vendor or device/device). These files contain a single line like 0x8086\n. Returns None on any read or parse failure — non-PCI interfaces (lo, veth*, bond masters, WireGuard) have no such file and that’s not an error.
validate_nickname
Validate and normalize a user-supplied nickname.