]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/syscall_windows.go
provider: Ensured Go 1.11 in TravisCI and README
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / fsouza / go-dockerclient / external / github.com / docker / docker / pkg / system / syscall_windows.go
CommitLineData
9b12e4fe
JC
1package system
2
3import (
4 "fmt"
5 "syscall"
6)
7
8// OSVersion is a wrapper for Windows version information
9// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx
10type OSVersion struct {
11 Version uint32
12 MajorVersion uint8
13 MinorVersion uint8
14 Build uint16
15}
16
17// GetOSVersion gets the operating system version on Windows. Note that
18// docker.exe must be manifested to get the correct version information.
19func GetOSVersion() (OSVersion, error) {
20 var err error
21 osv := OSVersion{}
22 osv.Version, err = syscall.GetVersion()
23 if err != nil {
24 return osv, fmt.Errorf("Failed to call GetVersion()")
25 }
26 osv.MajorVersion = uint8(osv.Version & 0xFF)
27 osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
28 osv.Build = uint16(osv.Version >> 16)
29 return osv, nil
30}
31
32// Unmount is a platform-specific helper function to call
33// the unmount syscall. Not supported on Windows
34func Unmount(dest string) error {
35 return nil
36}