Fixes a problem when using Docker on a host with an encrypted LLVM root. A docker container with a volume mounted from the host will see /dev/mapper in its mount info file, but will not be able to read it.

pull/741/head
John Floren 6 years ago
parent d80c43f9c9
commit 93e08ea089

@ -302,10 +302,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
if strings.HasPrefix(d.Device, "/dev/mapper/") {
devpath, err := filepath.EvalSymlinks(d.Device)
if err != nil {
return nil, err
if err == nil {
d.Device = devpath
}
d.Device = devpath
}
// /dev/root is not the real device name

Loading…
Cancel
Save