build(deps): bump github.com/Microsoft/hcsshim from 0.9.9 to 0.11.1

Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.9.9 to 0.11.1.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](https://github.com/Microsoft/hcsshim/compare/v0.9.9...v0.11.1)

---
updated-dependencies:
- dependency-name: github.com/Microsoft/hcsshim
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-10-16 15:11:01 +00:00
committed by GitHub
parent f20b8408a4
commit 18172539d8
339 changed files with 49928 additions and 3279 deletions

View File

@@ -1,3 +1,5 @@
//go:build windows
package wclayer
import (
@@ -6,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -262,7 +263,6 @@ func (r *legacyLayerReader) Next() (path string, size int64, fileInfo *winio.Fil
// The creation time and access time get reset for files outside of the Files path.
fileInfo.CreationTime = fileInfo.LastWriteTime
fileInfo.LastAccessTime = fileInfo.LastWriteTime
} else {
// The file attributes are written before the backup stream.
var attr uint32
@@ -294,6 +294,18 @@ func (r *legacyLayerReader) Next() (path string, size int64, fileInfo *winio.Fil
return
}
func (r *legacyLayerReader) LinkInfo() (uint32, *winio.FileIDInfo, error) {
fileStandardInfo, err := winio.GetFileStandardInfo(r.currentFile)
if err != nil {
return 0, nil, err
}
fileIDInfo, err := winio.GetFileID(r.currentFile)
if err != nil {
return 0, nil, err
}
return fileStandardInfo.NumberOfLinks, fileIDInfo, nil
}
func (r *legacyLayerReader) Read(b []byte) (int, error) {
if r.backupReader == nil {
if r.currentFile == nil {
@@ -349,7 +361,7 @@ type legacyLayerWriter struct {
currentIsDir bool
}
// newLegacyLayerWriter returns a LayerWriter that can write the contaler layer
// newLegacyLayerWriter returns a LayerWriter that can write the container layer
// transport format to disk.
func newLegacyLayerWriter(root string, parentRoots []string, destRoot string) (w *legacyLayerWriter, err error) {
w = &legacyLayerWriter{
@@ -376,7 +388,7 @@ func newLegacyLayerWriter(root string, parentRoots []string, destRoot string) (w
}
w.parentRoots = append(w.parentRoots, f)
}
w.bufWriter = bufio.NewWriterSize(ioutil.Discard, 65536)
w.bufWriter = bufio.NewWriterSize(io.Discard, 65536)
return
}
@@ -419,7 +431,7 @@ func (w *legacyLayerWriter) reset() error {
if err != nil {
return err
}
w.bufWriter.Reset(ioutil.Discard)
w.bufWriter.Reset(io.Discard)
if w.currentIsDir {
r := w.currentFile
br := winio.NewBackupStreamReader(r)
@@ -695,7 +707,7 @@ func (w *legacyLayerWriter) Add(name string, fileInfo *winio.FileBasicInfo) erro
// The file attributes are written before the stream.
err = binary.Write(w.bufWriter, binary.LittleEndian, uint32(fileInfo.FileAttributes))
if err != nil {
w.bufWriter.Reset(ioutil.Discard)
w.bufWriter.Reset(io.Discard)
return err
}
}
@@ -730,7 +742,7 @@ func (w *legacyLayerWriter) AddLink(name string, target string) error {
return errors.New("invalid hard link in layer")
}
// Find to try the target of the link in a previously added file. If that
// Try to find the target of the link in a previously added file. If that
// fails, search in parent layers.
var selectedRoot *os.File
if _, ok := w.addedFiles[target]; ok {