Merge pull request #741 from floren/fix-mapper

Fixes a problem when using Docker on a host with an encrypted LLVM root.
This commit is contained in:
shirou 2019-08-11 21:55:29 +09:00 committed by GitHub
commit dd49c3f47f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -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