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

@ -0,0 +1 @@
package hcserror

View File

@ -1,11 +1,13 @@
//go:build windows
package hcserror
import (
"errors"
"fmt"
"syscall"
)
const ERROR_GEN_FAILURE = syscall.Errno(31)
"golang.org/x/sys/windows"
)
type HcsError struct {
title string
@ -30,18 +32,21 @@ func (e *HcsError) Error() string {
func New(err error, title, rest string) error {
// Pass through DLL errors directly since they do not originate from HCS.
if _, ok := err.(*syscall.DLLError); ok {
var e *windows.DLLError
if errors.As(err, &e) {
return err
}
return &HcsError{title, rest, err}
}
func Win32FromError(err error) uint32 {
if herr, ok := err.(*HcsError); ok {
var herr *HcsError
if errors.As(err, &herr) {
return Win32FromError(herr.Err)
}
if code, ok := err.(syscall.Errno); ok {
var code windows.Errno
if errors.As(err, &code) {
return uint32(code)
}
return uint32(ERROR_GEN_FAILURE)
return uint32(windows.ERROR_GEN_FAILURE)
}