Skip to content

Commit

Permalink
Fixes a problem when using Docker on a host with an encrypted LLVM ro…
Browse files Browse the repository at this point in the history
…ot. 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.
  • Loading branch information
floren committed Aug 5, 2019
1 parent d80c43f commit 93e08ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions disk/disk_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93e08ea

Please sign in to comment.