Added missing vendored dependencies
This commit is contained in:
parent
7744a41358
commit
f970841472
|
@ -1,3 +1,4 @@
|
||||||
|
<<<<<<< df68129e5afd485c281a9b7a3cd36d3ed32ffd83
|
||||||
// +build !linux,!windows,!solaris
|
// +build !linux,!windows,!solaris
|
||||||
|
|
||||||
package system
|
package system
|
||||||
|
@ -6,3 +7,14 @@ package system
|
||||||
func ReadMemInfo() (*MemInfo, error) {
|
func ReadMemInfo() (*MemInfo, error) {
|
||||||
return nil, ErrNotSupportedPlatform
|
return nil, ErrNotSupportedPlatform
|
||||||
}
|
}
|
||||||
|
||||||| merged common ancestors
|
||||||
|
=======
|
||||||
|
// +build !linux,!windows
|
||||||
|
|
||||||
|
package system
|
||||||
|
|
||||||
|
// ReadMemInfo is not supported on platforms other than linux and windows.
|
||||||
|
func ReadMemInfo() (*MemInfo, error) {
|
||||||
|
return nil, ErrNotSupportedPlatform
|
||||||
|
}
|
||||||
|
>>>>>>> Added missing vendored dependencies
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<<<<<<< df68129e5afd485c281a9b7a3cd36d3ed32ffd83
|
||||||
// +build solaris
|
// +build solaris
|
||||||
|
|
||||||
package system
|
package system
|
||||||
|
@ -32,3 +33,23 @@ func Stat(path string) (*StatT, error) {
|
||||||
}
|
}
|
||||||
return fromStatT(s)
|
return fromStatT(s)
|
||||||
}
|
}
|
||||||
|
||||||| merged common ancestors
|
||||||
|
=======
|
||||||
|
// +build solaris
|
||||||
|
|
||||||
|
package system
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
)
|
||||||
|
|
||||||
|
// fromStatT creates a system.StatT type from a syscall.Stat_t type
|
||||||
|
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||||
|
return &StatT{size: s.Size,
|
||||||
|
mode: uint32(s.Mode),
|
||||||
|
uid: s.Uid,
|
||||||
|
gid: s.Gid,
|
||||||
|
rdev: uint64(s.Rdev),
|
||||||
|
mtim: s.Mtim}, nil
|
||||||
|
}
|
||||||
|
>>>>>>> Added missing vendored dependencies
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<<<<<<< df68129e5afd485c281a9b7a3cd36d3ed32ffd83
|
||||||
package system
|
package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -101,3 +102,79 @@ func HasWin32KSupport() bool {
|
||||||
// APIs.
|
// APIs.
|
||||||
return ntuserApiset.Load() == nil
|
return ntuserApiset.Load() == nil
|
||||||
}
|
}
|
||||||
|
||||||| merged common ancestors
|
||||||
|
=======
|
||||||
|
package system
|
||||||
|
|
||||||
|
import (
|
||||||
|
"syscall"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ntuserApiset = syscall.NewLazyDLL("ext-ms-win-ntuser-window-l1-1-0")
|
||||||
|
)
|
||||||
|
|
||||||
|
// OSVersion is a wrapper for Windows version information
|
||||||
|
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
|
||||||
|
type OSVersion struct {
|
||||||
|
Version uint32
|
||||||
|
MajorVersion uint8
|
||||||
|
MinorVersion uint8
|
||||||
|
Build uint16
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOSVersion gets the operating system version on Windows. Note that
|
||||||
|
// docker.exe must be manifested to get the correct version information.
|
||||||
|
func GetOSVersion() OSVersion {
|
||||||
|
var err error
|
||||||
|
osv := OSVersion{}
|
||||||
|
osv.Version, err = syscall.GetVersion()
|
||||||
|
if err != nil {
|
||||||
|
// GetVersion never fails.
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
osv.MajorVersion = uint8(osv.Version & 0xFF)
|
||||||
|
osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
|
||||||
|
osv.Build = uint16(osv.Version >> 16)
|
||||||
|
return osv
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unmount is a platform-specific helper function to call
|
||||||
|
// the unmount syscall. Not supported on Windows
|
||||||
|
func Unmount(dest string) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// CommandLineToArgv wraps the Windows syscall to turn a commandline into an argument array.
|
||||||
|
func CommandLineToArgv(commandLine string) ([]string, error) {
|
||||||
|
var argc int32
|
||||||
|
|
||||||
|
argsPtr, err := syscall.UTF16PtrFromString(commandLine)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
argv, err := syscall.CommandLineToArgv(argsPtr, &argc)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer syscall.LocalFree(syscall.Handle(uintptr(unsafe.Pointer(argv))))
|
||||||
|
|
||||||
|
newArgs := make([]string, argc)
|
||||||
|
for i, v := range (*argv)[:argc] {
|
||||||
|
newArgs[i] = string(syscall.UTF16ToString((*v)[:]))
|
||||||
|
}
|
||||||
|
|
||||||
|
return newArgs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasWin32KSupport determines whether containers that depend on win32k can
|
||||||
|
// run on this machine. Win32k is the driver used to implement windowing.
|
||||||
|
func HasWin32KSupport() bool {
|
||||||
|
// For now, check for ntuser API support on the host. In the future, a host
|
||||||
|
// may support win32k in containers even if the host does not support ntuser
|
||||||
|
// APIs.
|
||||||
|
return ntuserApiset.Load() == nil
|
||||||
|
}
|
||||||
|
>>>>>>> Added missing vendored dependencies
|
||||||
|
|
|
@ -223,6 +223,30 @@
|
||||||
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
||||||
"revisionTime": "2016-05-28T08:11:04Z"
|
"revisionTime": "2016-05-28T08:11:04Z"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "iP5slJJPRZUm0rfdII8OiATAACA=",
|
||||||
|
"path": "github.com/docker/docker/pkg/idtools",
|
||||||
|
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||||
|
"revisionTime": "2016-05-20T15:17:10Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "tdhmIGUaoOMEDymMC23qTS7bt0g=",
|
||||||
|
"path": "github.com/docker/docker/pkg/ioutils",
|
||||||
|
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||||
|
"revisionTime": "2016-05-20T15:17:10Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "rArZ5mYIe9I1L5PRQOJu8BwafFw=",
|
||||||
|
"path": "github.com/docker/docker/pkg/pools",
|
||||||
|
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||||
|
"revisionTime": "2016-05-20T15:17:10Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "txf3EORYff4hO6PEvwBm2lyh1MU=",
|
||||||
|
"path": "github.com/docker/docker/pkg/promise",
|
||||||
|
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||||
|
"revisionTime": "2016-05-20T15:17:10Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "YDYbS5U2mDwfcOUJ6M09cP6Bubg=",
|
"checksumSHA1": "YDYbS5U2mDwfcOUJ6M09cP6Bubg=",
|
||||||
"path": "github.com/docker/docker/pkg/stdcopy",
|
"path": "github.com/docker/docker/pkg/stdcopy",
|
||||||
|
@ -235,6 +259,12 @@
|
||||||
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
||||||
"revisionTime": "2016-05-28T08:11:04Z"
|
"revisionTime": "2016-05-28T08:11:04Z"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "QcztYNLTWLhamq8fPdk63hqIOMc=",
|
||||||
|
"path": "github.com/docker/docker/pkg/system",
|
||||||
|
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||||
|
"revisionTime": "2016-05-20T15:17:10Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"comment": "v0.1.0-23-g5d2041e",
|
"comment": "v0.1.0-23-g5d2041e",
|
||||||
"path": "github.com/docker/go-units",
|
"path": "github.com/docker/go-units",
|
||||||
|
|
Loading…
Reference in New Issue