disk: trim the device mapper name.

While reading the value of the file with `ioutil.ReadFile`,
the name is suffixed with a `\n`

Tested on Ubuntu 18.10
pull/619/head
Remy Mathieu 6 years ago
parent d6b9922e03
commit fda98ebc34

@ -433,7 +433,7 @@ func GetLabel(name string) string {
if err != nil {
return ""
} else {
return string(dmname)
return strings.TrimSpace(string(dmname))
}
}

Loading…
Cancel
Save