Merge pull request #216 from zstyblik/add-documentation
[disk]linux: add documentation for GetDiskSerialNumber()
This commit is contained in:
commit
93e9068485
|
@ -336,6 +336,8 @@ func IOCounters() (map[string]IOCountersStat, error) {
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetDiskSerialNumber returns Serial Number of given device or empty string
|
||||||
|
// on error. Name of device is expected, eg. /dev/sda
|
||||||
func GetDiskSerialNumber(name string) string {
|
func GetDiskSerialNumber(name string) string {
|
||||||
n := fmt.Sprintf("--name=%s", name)
|
n := fmt.Sprintf("--name=%s", name)
|
||||||
udevadm, err := exec.LookPath("/sbin/udevadm")
|
udevadm, err := exec.LookPath("/sbin/udevadm")
|
||||||
|
|
Loading…
Reference in New Issue