address review

pull/519/head
Ofek Lev 7 years ago
parent 35ed9c11c7
commit 0f8edaa97e

@ -117,6 +117,10 @@ Several methods have been added which are not present in psutil, but will provid
- VirtualizationSystem (ex: "LXC")
- VirtualizationRole (ex: "guest"/"host")
- IOCounters
- Label (linux only) The registered [device mapper name](https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-block-dm)
- cpu/CPUInfo() (linux, freebsd)
- CPU (ex: 0, 1, ...)

@ -415,7 +415,7 @@ func GetDiskSerialNumberWithContext(ctx context.Context, name string) string {
// See https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-block-dm
func GetLabel(name string) string {
// Try label based on devicemapper name
dmname_filename := fmt.Sprintf("/sys/block/%s/dm/name", name)
dmname_filename := common.HostSys(fmt.Sprintf("block/%s/dm/name", name))
if !common.PathExists(dmname_filename) {
return ""

Loading…
Cancel
Save