From 9a928183a722219b4e5622e95e22fb506791959e Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Mon, 22 Sep 2014 16:40:07 +0900 Subject: [PATCH] sorry, I committed an old file. --- disk_linux.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/disk_linux.go b/disk_linux.go index 25a5ad1..51e504b 100644 --- a/disk_linux.go +++ b/disk_linux.go @@ -99,13 +99,13 @@ func DiskIOCounters() (map[string]DiskIOCountersStat, error) { return ret, nil } -func GetDiskSerialNumber(name string) (string, error) { +func GetDiskSerialNumber(name string) string { n := fmt.Sprintf("--name=%s", name) out, err := exec.Command("/sbin/udevadm", "info", "--query=property", n).Output() // does not return error, just an empty string if err != nil { - return "", nil + return "" } lines := strings.Split(string(out), "\n") for _, line := range lines { @@ -114,7 +114,7 @@ func GetDiskSerialNumber(name string) (string, error) { // only get ID_SERIAL, not ID_SERIAL_SHORT continue } - return values[1], nil + return values[1] } - return "", nil + return "" }