mirror of
https://github.com/containers/skopeo.git
synced 2025-09-03 15:46:42 +00:00
fix(deps): update module github.com/containers/storage to v1.58.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.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
|
||||
|
6
vendor/github.com/containers/storage/internal/dedup/dedup_linux.go
generated
vendored
6
vendor/github.com/containers/storage/internal/dedup/dedup_linux.go
generated
vendored
@@ -48,7 +48,7 @@ func (d *dedupFiles) isFirstVisitOf(fi fs.FileInfo) (bool, error) {
|
||||
if !ok {
|
||||
return false, fmt.Errorf("unable to get raw syscall.Stat_t data")
|
||||
}
|
||||
return d.recordInode(uint64(st.Dev), st.Ino)
|
||||
return d.recordInode(uint64(st.Dev), st.Ino) //nolint:unconvert
|
||||
}
|
||||
|
||||
// dedup deduplicates the file at src path to dst path
|
||||
@@ -94,11 +94,11 @@ func (d *dedupFiles) dedup(src, dst string, fiDst fs.FileInfo) (uint64, error) {
|
||||
}
|
||||
err = unix.IoctlFileDedupeRange(int(srcFile.Fd()), &value)
|
||||
if err == nil {
|
||||
return uint64(value.Info[0].Bytes_deduped), nil
|
||||
return value.Info[0].Bytes_deduped, nil
|
||||
}
|
||||
|
||||
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