mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-22 23:03:29 +00:00
Migrate to containerd v1.7.0 and update dependencies
* Updates containerd to v1.7.0 and new binary for 32-bit Arm OSes. * Updates Go dependencies - openfaas and external Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
9efd019e86
commit
c41c2cd9fc
26
vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go
generated
vendored
26
vendor/github.com/Microsoft/hcsshim/internal/wclayer/legacy.go
generated
vendored
@ -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 {
|
||||
|
Reference in New Issue
Block a user