[disk]linux: add documentation for GetDiskSerialNumber()

Commit adds documentation for GetDiskSerialNumber(), because it wasn't clear
what was expected as a parameter.

Fixes #212
This commit is contained in:
Zdenek Styblik 2016-06-13 11:11:12 +02:00
parent dd9b50926c
commit 70cbab7045
1 changed files with 2 additions and 0 deletions

View File

@ -336,6 +336,8 @@ func IOCounters() (map[string]IOCountersStat, error) {
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 {
n := fmt.Sprintf("--name=%s", name)
udevadm, err := exec.LookPath("/sbin/udevadm")