Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( VpdDir = "/sys/firmware/vpd" MaxBootEntry = 9999 )
VpdDir points to the base directory where the VPD sysfs interface is located. It is an exported variable to allow for testing
Functions ¶
func Get ¶
Get reads a VPD variable by name and returns its value as a sequence of bytes. The `readOnly` flag specifies whether the variable is read-only or read-write.
func GetAll ¶
GetAll reads all the VPD variables and returns a map contaiing each name:value couple. The `readOnly` flag specifies whether the variable is read-only or read-write.
func Set ¶
Set sets a VPD variable with `key` as name and `value` as its byte-stream value. The `readOnly` flag specifies whether the variable is read-only or read-write. NOTE Unfortunately Set doesn't currently work, because the sysfs interface does not support writing. To write, this library needs a backend able to write to flash chips, like the command line tool flashrom or flashtools.
Types ¶
This section is empty.