diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-07 10:21:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 10:21:27 -0400 |
commit | aa5cd674aec28ecf207d6982797b1bb000a2b322 (patch) | |
tree | b51fc4ce00b65f34c5c0fe129b50a0a71be645df /vendor/github.com/containerd/continuity/fs/hardlink.go | |
parent | b533fcb12eecc5206a0cb3e93fed1abc2f3abf3b (diff) | |
parent | a3fb15dffb1ce9c4c2dacceaa1e535ada4819060 (diff) | |
download | podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.tar.gz podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.tar.bz2 podman-aa5cd674aec28ecf207d6982797b1bb000a2b322.zip |
Merge pull request #10257 from containers/dependabot/go_modules/github.com/docker/docker-20.10.6incompatible
Bump github.com/docker/docker from 20.10.3-0.20210216175712-646072ed6524+incompatible to 20.10.6+incompatible
Diffstat (limited to 'vendor/github.com/containerd/continuity/fs/hardlink.go')
-rw-r--r-- | vendor/github.com/containerd/continuity/fs/hardlink.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/vendor/github.com/containerd/continuity/fs/hardlink.go b/vendor/github.com/containerd/continuity/fs/hardlink.go deleted file mode 100644 index 762aa45e6..000000000 --- a/vendor/github.com/containerd/continuity/fs/hardlink.go +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package fs - -import "os" - -// GetLinkInfo returns an identifier representing the node a hardlink is pointing -// to. If the file is not hard linked then 0 will be returned. -func GetLinkInfo(fi os.FileInfo) (uint64, bool) { - return getLinkInfo(fi) -} - -// getLinkSource returns a path for the given name and -// file info to its link source in the provided inode -// map. If the given file name is not in the map and -// has other links, it is added to the inode map -// to be a source for other link locations. -func getLinkSource(name string, fi os.FileInfo, inodes map[uint64]string) (string, error) { - inode, isHardlink := getLinkInfo(fi) - if !isHardlink { - return "", nil - } - - path, ok := inodes[inode] - if !ok { - inodes[inode] = name - } - return path, nil -} |