diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-25 21:40:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 21:40:38 +0200 |
commit | 5b7086abda91f4301af3bfb642d416a22349c276 (patch) | |
tree | bf139f29b261e55c161394637f1c7073da5103f0 /vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go | |
parent | a488e197a6e3947dd420b40ed834b50db9c829c3 (diff) | |
parent | 2388222e98462fdbbe44f3e091b2b79d80956a9a (diff) | |
download | podman-5b7086abda91f4301af3bfb642d416a22349c276.tar.gz podman-5b7086abda91f4301af3bfb642d416a22349c276.tar.bz2 podman-5b7086abda91f4301af3bfb642d416a22349c276.zip |
Merge pull request #3418 from vrothberg/go-modules
update dependencies
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go')
-rw-r--r-- | vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go b/vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go index 15660ddef..7647734de 100644 --- a/vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go +++ b/vendor/github.com/Microsoft/hcsshim/mksyscall_windows.go @@ -300,7 +300,10 @@ func (r *Rets) SetErrorCode() string { %s = %sErrno(r0) }` const hrCode = `if int32(r0) < 0 { - %s = interop.Win32FromHresult(r0) + if r0&0x1fff0000 == 0x00070000 { + r0 &= 0xffff + } + %s = %sErrno(r0) }` if r.Name == "" && !r.ReturnsError { return "" @@ -310,7 +313,7 @@ func (r *Rets) SetErrorCode() string { } if r.Type == "error" { if r.Name == "hr" { - return fmt.Sprintf(hrCode, r.Name) + return fmt.Sprintf(hrCode, r.Name, syscalldot()) } else { return fmt.Sprintf(code, r.Name, syscalldot()) } @@ -773,7 +776,6 @@ func (src *Source) Generate(w io.Writer) error { src.ExternalImport("golang.org/x/sys/windows") } } - src.ExternalImport("github.com/Microsoft/hcsshim/internal/interop") if *winio { src.ExternalImport("github.com/Microsoft/go-winio") } @@ -788,6 +790,9 @@ func (src *Source) Generate(w io.Writer) error { if !*systemDLL { return syscalldot() + "NewLazyDLL(" + arg + ")" } + if strings.HasPrefix(dll, "api_") || strings.HasPrefix(dll, "ext_") { + arg = strings.Replace(arg, "_", "-", -1) + } switch pkgtype { case pkgStd: return syscalldot() + "NewLazyDLL(sysdll.Add(" + arg + "))" |