mirror of
https://github.com/containers/podman.git
synced 2025-12-10 15:47:46 +08:00
vendor: bump c/common to 9b0d134f392
Bump common to 9b0d134f392f41de3f3065aad162e73a3904168e Signed-off-by: flouthoc <flouthoc.git@gmail.com>
This commit is contained in:
6
vendor/github.com/containers/storage/internal/dedup/dedup.go
generated
vendored
6
vendor/github.com/containers/storage/internal/dedup/dedup.go
generated
vendored
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var notSupported = errors.New("reflinks are not supported on this platform")
|
||||
var errNotSupported = errors.New("reflinks are not supported on this platform")
|
||||
|
||||
const (
|
||||
DedupHashInvalid DedupHashMethod = iota
|
||||
@@ -134,7 +134,7 @@ func DedupDirs(dirs []string, options DedupOptions) (DedupResult, error) {
|
||||
break
|
||||
}
|
||||
logrus.Debugf("Failed to deduplicate: %v", err)
|
||||
if errors.Is(err, notSupported) {
|
||||
if errors.Is(err, errNotSupported) {
|
||||
return dedupBytes, err
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ func DedupDirs(dirs []string, options DedupOptions) (DedupResult, error) {
|
||||
return nil
|
||||
}); err != nil {
|
||||
// if reflinks are not supported, return immediately without errors
|
||||
if errors.Is(err, notSupported) {
|
||||
if errors.Is(err, errNotSupported) {
|
||||
return res, nil
|
||||
}
|
||||
return res, err
|
||||
|
||||
2
vendor/github.com/containers/storage/internal/dedup/dedup_linux.go
generated
vendored
2
vendor/github.com/containers/storage/internal/dedup/dedup_linux.go
generated
vendored
@@ -98,7 +98,7 @@ func (d *dedupFiles) dedup(src, dst string, fiDst fs.FileInfo) (uint64, error) {
|
||||
}
|
||||
|
||||
if errors.Is(err, unix.ENOTSUP) {
|
||||
return 0, notSupported
|
||||
return 0, errNotSupported
|
||||
}
|
||||
return 0, fmt.Errorf("failed to clone file %q: %w", src, err)
|
||||
}
|
||||
|
||||
8
vendor/github.com/containers/storage/internal/dedup/dedup_unsupported.go
generated
vendored
8
vendor/github.com/containers/storage/internal/dedup/dedup_unsupported.go
generated
vendored
@@ -9,19 +9,19 @@ import (
|
||||
type dedupFiles struct{}
|
||||
|
||||
func newDedupFiles() (*dedupFiles, error) {
|
||||
return nil, notSupported
|
||||
return nil, errNotSupported
|
||||
}
|
||||
|
||||
// isFirstVisitOf records that the file is being processed. Returns true if the file was already visited.
|
||||
func (d *dedupFiles) isFirstVisitOf(fi fs.FileInfo) (bool, error) {
|
||||
return false, notSupported
|
||||
return false, errNotSupported
|
||||
}
|
||||
|
||||
// dedup deduplicates the file at src path to dst path
|
||||
func (d *dedupFiles) dedup(src, dst string, fiDst fs.FileInfo) (uint64, error) {
|
||||
return 0, notSupported
|
||||
return 0, errNotSupported
|
||||
}
|
||||
|
||||
func readAllFile(path string, info fs.FileInfo, fn func([]byte) (string, error)) (string, error) {
|
||||
return "", notSupported
|
||||
return "", errNotSupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user