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,11 +302,10 @@ 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
}
}
// /dev/root is not the real device name
// so we get the real device name from its major/minor number

Loading…
Cancel
Save