Merge pull request #686 from tonylambiris/tl/check-for-logical-volumes

Tl/check for logical volumes
tags/v2.19.6
Lomanic 6 years ago committed by GitHub
commit 97328c4ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -298,6 +298,14 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
}
}
if strings.HasPrefix(d.Device, "/dev/mapper/") {
devpath, err := os.Readlink(d.Device)
if err != nil {
return nil, err
}
d.Device = "/dev/" + filepath.Base(devpath)
}
// /dev/root is not the real device name
// so we get the real device name from its major/minor number
if d.Device == "/dev/root" {

Loading…
Cancel
Save