From f2eb79fb5fb10275c014b55c13e28ff02d3b70a8 Mon Sep 17 00:00:00 2001 From: ebiggers Date: Thu, 23 Jan 2020 13:41:42 -0800 Subject: filesystem: remove canonicalizePath() (#185) canonicalizePath() is now only used by an error path in getMountFromLink(), which we can make use getDeviceName() instead. --- filesystem/mountpoint.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'filesystem/mountpoint.go') diff --git a/filesystem/mountpoint.go b/filesystem/mountpoint.go index 6119be8..edbdc85 100644 --- a/filesystem/mountpoint.go +++ b/filesystem/mountpoint.go @@ -319,9 +319,8 @@ func getMountFromLink(link string) (*Mount, error) { } mnt, ok := mountsByDevice[deviceNumber] if !ok { - devicePath, _ := canonicalizePath(searchPath) return nil, errors.Wrapf(ErrFollowLink, "no mounts for device %q (%v)", - devicePath, deviceNumber) + getDeviceName(deviceNumber), deviceNumber) } if mnt == nil { return nil, filesystemRootDirNotVisibleError(deviceNumber) -- cgit v1.2.3