Update hcsshim tag to v0.10.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
		
							
								
								
									
										57
									
								
								vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										57
									
								
								vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,57 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
mkwinsyscall generates windows system call bodies
 | 
			
		||||
 | 
			
		||||
It parses all files specified on command line containing function
 | 
			
		||||
prototypes (like syscall_windows.go) and prints system call bodies
 | 
			
		||||
to standard output.
 | 
			
		||||
 | 
			
		||||
The prototypes are marked by lines beginning with "//sys" and read
 | 
			
		||||
like func declarations if //sys is replaced by func, but:
 | 
			
		||||
 | 
			
		||||
  - The parameter lists must give a name for each argument. This
 | 
			
		||||
    includes return parameters.
 | 
			
		||||
 | 
			
		||||
  - The parameter lists must give a type for each argument:
 | 
			
		||||
    the (x, y, z int) shorthand is not allowed.
 | 
			
		||||
 | 
			
		||||
  - If the return parameter is an error number, it must be named err.
 | 
			
		||||
 | 
			
		||||
  - If go func name needs to be different from its winapi dll name,
 | 
			
		||||
    the winapi name could be specified at the end, after "=" sign, like
 | 
			
		||||
 | 
			
		||||
    //sys LoadLibrary(libname string) (handle uint32, err error) = LoadLibraryA
 | 
			
		||||
 | 
			
		||||
  - Each function that returns err needs to supply a condition, that
 | 
			
		||||
    return value of winapi will be tested against to detect failure.
 | 
			
		||||
    This would set err to windows "last-error", otherwise it will be nil.
 | 
			
		||||
    The value can be provided at end of //sys declaration, like
 | 
			
		||||
 | 
			
		||||
    //sys LoadLibrary(libname string) (handle uint32, err error) [failretval==-1] = LoadLibraryA
 | 
			
		||||
 | 
			
		||||
    and is [failretval==0] by default.
 | 
			
		||||
 | 
			
		||||
  - If the function name ends in a "?", then the function not existing is non-
 | 
			
		||||
    fatal, and an error will be returned instead of panicking.
 | 
			
		||||
 | 
			
		||||
Usage:
 | 
			
		||||
 | 
			
		||||
	mkwinsyscall [flags] [path ...]
 | 
			
		||||
 | 
			
		||||
Flags
 | 
			
		||||
 | 
			
		||||
	-output string
 | 
			
		||||
	      Output file name (standard output if omitted).
 | 
			
		||||
	-sort
 | 
			
		||||
	      Sort DLL and function declarations (default true).
 | 
			
		||||
	      Intended to help transition from  older versions of mkwinsyscall by making diffs
 | 
			
		||||
	      easier to read and understand.
 | 
			
		||||
	-systemdll
 | 
			
		||||
	      Whether all DLLs should be loaded from the Windows system directory (default true).
 | 
			
		||||
	-trace
 | 
			
		||||
	      Generate print statement after every syscall.
 | 
			
		||||
	-utf16
 | 
			
		||||
	      Encode string arguments as UTF-16 for syscalls not ending in 'A' or 'W' (default true).
 | 
			
		||||
	-winio
 | 
			
		||||
	      Import this package ("github.com/Microsoft/go-winio").
 | 
			
		||||
*/
 | 
			
		||||
package main
 | 
			
		||||
							
								
								
									
										1059
									
								
								vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/mkwinsyscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1059
									
								
								vendor/github.com/Microsoft/go-winio/tools/mkwinsyscall/mkwinsyscall.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4
									
								
								vendor/github.com/Microsoft/hcsshim/.golangci.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/Microsoft/hcsshim/.golangci.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -135,9 +135,9 @@ issues:
 | 
			
		||||
      linters:
 | 
			
		||||
        - stylecheck
 | 
			
		||||
      Text: "ST1003:"
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # v0 APIs are deprecated, but still retained for backwards compatability
 | 
			
		||||
    - path: cmd\\ncproxy\\
 | 
			
		||||
      linters:
 | 
			
		||||
        - staticcheck
 | 
			
		||||
      text: "^SA1019: (ncproxygrpcv0|nodenetsvcV0)"
 | 
			
		||||
      text: "^SA1019: .*(ncproxygrpc|nodenetsvc)[/]?v0"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										55
									
								
								vendor/github.com/Microsoft/hcsshim/Protobuild.toml
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								vendor/github.com/Microsoft/hcsshim/Protobuild.toml
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,52 +1,25 @@
 | 
			
		||||
version = "1"
 | 
			
		||||
generator = "gogoctrd"
 | 
			
		||||
plugins = ["grpc", "fieldpath"]
 | 
			
		||||
version = "2"
 | 
			
		||||
generators = ["go", "go-grpc"]
 | 
			
		||||
 | 
			
		||||
# Control protoc include paths. Below are usually some good defaults, but feel
 | 
			
		||||
# free to try it without them if it works for your project.
 | 
			
		||||
# Control protoc include paths.
 | 
			
		||||
[includes]
 | 
			
		||||
  # Include paths that will be added before all others. Typically, you want to
 | 
			
		||||
  # treat the root of the project as an include, but this may not be necessary.
 | 
			
		||||
  before = ["./protobuf"]
 | 
			
		||||
 | 
			
		||||
  # defaults are "/usr/local/include" and "/usr/include", which don't exist on Windows.
 | 
			
		||||
  # override defaults to supress errors about non-existant directories.
 | 
			
		||||
  after = []
 | 
			
		||||
 | 
			
		||||
  # Paths that should be treated as include roots in relation to the vendor
 | 
			
		||||
  # directory. These will be calculated with the vendor directory nearest the
 | 
			
		||||
  # target package.
 | 
			
		||||
  packages = ["github.com/gogo/protobuf"]
 | 
			
		||||
 | 
			
		||||
# This section maps protobuf imports to Go packages. These will become
 | 
			
		||||
# `-M` directives in the call to the go protobuf generator.
 | 
			
		||||
# This section maps protobuf imports to Go packages.
 | 
			
		||||
[packages]
 | 
			
		||||
  "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto"
 | 
			
		||||
  "google/protobuf/any.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "google/protobuf/struct.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
 | 
			
		||||
  "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "google/protobuf/duration.proto" = "github.com/gogo/protobuf/types"
 | 
			
		||||
  "github/containerd/cgroups/stats/v1/metrics.proto" = "github.com/containerd/cgroups/stats/v1"
 | 
			
		||||
  # github.com/containerd/cgroups protofiles still list their go path as "github.com/containerd/cgroups/cgroup1/stats"
 | 
			
		||||
  "github.com/containerd/cgroups/v3/cgroup1/stats/metrics.proto" = "github.com/containerd/cgroups/v3/cgroup1/stats"
 | 
			
		||||
 | 
			
		||||
[[overrides]]
 | 
			
		||||
prefixes = ["github.com/Microsoft/hcsshim/internal/shimdiag"]
 | 
			
		||||
plugins = ["ttrpc"]
 | 
			
		||||
 | 
			
		||||
[[overrides]]
 | 
			
		||||
prefixes = ["github.com/Microsoft/hcsshim/internal/extendedtask"]
 | 
			
		||||
plugins = ["ttrpc"]
 | 
			
		||||
 | 
			
		||||
[[overrides]]
 | 
			
		||||
prefixes = ["github.com/Microsoft/hcsshim/internal/computeagent"]
 | 
			
		||||
plugins = ["ttrpc"]
 | 
			
		||||
 | 
			
		||||
[[overrides]]
 | 
			
		||||
prefixes = ["github.com/Microsoft/hcsshim/internal/ncproxyttrpc"]
 | 
			
		||||
plugins = ["ttrpc"]
 | 
			
		||||
 | 
			
		||||
[[overrides]]
 | 
			
		||||
prefixes = ["github.com/Microsoft/hcsshim/internal/vmservice"]
 | 
			
		||||
plugins = ["ttrpc"]
 | 
			
		||||
prefixes = [
 | 
			
		||||
  "github.com/Microsoft/hcsshim/internal/shimdiag",
 | 
			
		||||
  "github.com/Microsoft/hcsshim/internal/extendedtask",
 | 
			
		||||
  "github.com/Microsoft/hcsshim/internal/computeagent",
 | 
			
		||||
  "github.com/Microsoft/hcsshim/internal/ncproxyttrpc",
 | 
			
		||||
  "github.com/Microsoft/hcsshim/internal/vmservice",
 | 
			
		||||
]
 | 
			
		||||
generators = ["go", "go-ttrpc"]
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2191
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2191
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -2,10 +2,9 @@ syntax = "proto3";
 | 
			
		||||
 | 
			
		||||
package containerd.runhcs.v1;
 | 
			
		||||
 | 
			
		||||
import weak "gogoproto/gogo.proto";
 | 
			
		||||
import "google/protobuf/timestamp.proto";
 | 
			
		||||
 | 
			
		||||
option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options;options";
 | 
			
		||||
option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options";
 | 
			
		||||
 | 
			
		||||
// Options are the set of customizations that can be passed at Create time.
 | 
			
		||||
message Options {
 | 
			
		||||
@@ -114,7 +113,7 @@ message Options {
 | 
			
		||||
// info returned in the Pids query.
 | 
			
		||||
message ProcessDetails {
 | 
			
		||||
	string image_name = 1;
 | 
			
		||||
	google.protobuf.Timestamp created_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
 | 
			
		||||
	google.protobuf.Timestamp created_at = 2;
 | 
			
		||||
	uint64 kernel_time_100_ns = 3;
 | 
			
		||||
	uint64 memory_commit_bytes = 4;
 | 
			
		||||
	uint64 memory_working_set_private_bytes = 5;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/doc.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,5 +2,5 @@ package stats
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	// go mod will not vendor without an import for metrics.proto
 | 
			
		||||
	_ "github.com/containerd/cgroups/stats/v1"
 | 
			
		||||
	_ "github.com/containerd/cgroups/v3/cgroup1/stats"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										0
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										0
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/next.pb.txt
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
								
								
									
										3525
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3525
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										19
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats/stats.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,9 +2,8 @@ syntax = "proto3";
 | 
			
		||||
 | 
			
		||||
package containerd.runhcs.stats.v1;
 | 
			
		||||
 | 
			
		||||
import weak "gogoproto/gogo.proto";
 | 
			
		||||
import "google/protobuf/timestamp.proto";
 | 
			
		||||
import "github.com/containerd/cgroups/stats/v1/metrics.proto";
 | 
			
		||||
import "github.com/containerd/cgroups/v3/cgroup1/stats/metrics.proto";
 | 
			
		||||
 | 
			
		||||
option go_package = "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/stats;stats";
 | 
			
		||||
 | 
			
		||||
@@ -13,22 +12,22 @@ message Statistics {
 | 
			
		||||
		WindowsContainerStatistics windows = 1;
 | 
			
		||||
		io.containerd.cgroups.v1.Metrics linux = 2;
 | 
			
		||||
	}
 | 
			
		||||
	VirtualMachineStatistics vm = 3 [(gogoproto.customname) = "VM"];
 | 
			
		||||
	VirtualMachineStatistics vm = 3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message WindowsContainerStatistics {
 | 
			
		||||
	google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
 | 
			
		||||
	google.protobuf.Timestamp container_start_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
 | 
			
		||||
	uint64 uptime_ns = 3 [(gogoproto.customname) = "UptimeNS"];
 | 
			
		||||
	google.protobuf.Timestamp timestamp = 1;
 | 
			
		||||
	google.protobuf.Timestamp container_start_time = 2;
 | 
			
		||||
	uint64 uptime_ns = 3;
 | 
			
		||||
	WindowsContainerProcessorStatistics processor = 4;
 | 
			
		||||
	WindowsContainerMemoryStatistics memory = 5;
 | 
			
		||||
	WindowsContainerStorageStatistics storage = 6;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message WindowsContainerProcessorStatistics {
 | 
			
		||||
	uint64 total_runtime_ns = 1 [(gogoproto.customname) = "TotalRuntimeNS"];
 | 
			
		||||
	uint64 runtime_user_ns = 2 [(gogoproto.customname) = "RuntimeUserNS"];
 | 
			
		||||
	uint64 runtime_kernel_ns = 3 [(gogoproto.customname) = "RuntimeKernelNS"];
 | 
			
		||||
	uint64 total_runtime_ns = 1;
 | 
			
		||||
	uint64 runtime_user_ns = 2;
 | 
			
		||||
	uint64 runtime_kernel_ns = 3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message WindowsContainerMemoryStatistics {
 | 
			
		||||
@@ -50,7 +49,7 @@ message VirtualMachineStatistics {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message VirtualMachineProcessorStatistics {
 | 
			
		||||
	uint64 total_runtime_ns = 1 [(gogoproto.customname) = "TotalRuntimeNS"];
 | 
			
		||||
	uint64 total_runtime_ns = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message VirtualMachineMemoryStatistics {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/ext4/tar2ext4/tar2ext4.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/ext4/tar2ext4/tar2ext4.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -149,7 +149,7 @@ func ConvertTarToExt4(r io.Reader, w io.ReadWriteSeeker, options ...Option) erro
 | 
			
		||||
 | 
			
		||||
			var typ uint16
 | 
			
		||||
			switch hdr.Typeflag {
 | 
			
		||||
			case tar.TypeReg, tar.TypeRegA:
 | 
			
		||||
			case tar.TypeReg:
 | 
			
		||||
				typ = compactext4.S_IFREG
 | 
			
		||||
			case tar.TypeSymlink:
 | 
			
		||||
				typ = compactext4.S_IFLNK
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cim_mount.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/cim_mount.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
/*
 | 
			
		||||
 * HCS API
 | 
			
		||||
 *
 | 
			
		||||
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 | 
			
		||||
 *
 | 
			
		||||
 * API version: 2.5
 | 
			
		||||
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package hcsschema
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	CimMountFlagNone         uint32 = 0x0
 | 
			
		||||
	CimMountFlagChildOnly    uint32 = 0x1
 | 
			
		||||
	CimMountFlagEnableDax    uint32 = 0x2
 | 
			
		||||
	CimMountFlagCacheFiles   uint32 = 0x4
 | 
			
		||||
	CimMountFlagCacheRegions uint32 = 0x8
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type CimMount struct {
 | 
			
		||||
	ImagePath      string `json:"ImagePath,omitempty"`
 | 
			
		||||
	FileSystemName string `json:"FileSystemName,omitempty"`
 | 
			
		||||
	VolumeGuid     string `json:"VolumeGuid,omitempty"`
 | 
			
		||||
	MountFlags     uint32 `json:"MountFlags,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/properties.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/properties.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -10,7 +10,7 @@
 | 
			
		||||
package hcsschema
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	v1 "github.com/containerd/cgroups/stats/v1"
 | 
			
		||||
	v1 "github.com/containerd/cgroups/v3/cgroup1/stats"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Properties struct {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								vendor/github.com/Microsoft/hcsshim/internal/log/format.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								vendor/github.com/Microsoft/hcsshim/internal/log/format.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -4,12 +4,13 @@ import (
 | 
			
		||||
	"bytes"
 | 
			
		||||
	"context"
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"net"
 | 
			
		||||
	"reflect"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/containerd/containerd/log"
 | 
			
		||||
	"google.golang.org/protobuf/encoding/protojson"
 | 
			
		||||
	"google.golang.org/protobuf/proto"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const TimeFormat = log.RFC3339NanoFixed
 | 
			
		||||
@@ -67,16 +68,22 @@ func Format(ctx context.Context, v interface{}) string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func encode(v interface{}) ([]byte, error) {
 | 
			
		||||
	return encodeBuffer(&bytes.Buffer{}, v)
 | 
			
		||||
}
 | 
			
		||||
	if m, ok := v.(proto.Message); ok {
 | 
			
		||||
		// use canonical JSON encoding for protobufs (instead of [encoding/json])
 | 
			
		||||
		// https://protobuf.dev/programming-guides/proto3/#json
 | 
			
		||||
		return protojson.MarshalOptions{
 | 
			
		||||
			AllowPartial: true,
 | 
			
		||||
			// protobuf defaults to camel case for JSON encoding; use proto field name instead (snake case)
 | 
			
		||||
			UseProtoNames: true,
 | 
			
		||||
		}.Marshal(m)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
func encodeBuffer(buf *bytes.Buffer, v interface{}) ([]byte, error) {
 | 
			
		||||
	buf := &bytes.Buffer{}
 | 
			
		||||
	enc := json.NewEncoder(buf)
 | 
			
		||||
	enc.SetEscapeHTML(false)
 | 
			
		||||
	enc.SetIndent("", "")
 | 
			
		||||
 | 
			
		||||
	if err := enc.Encode(v); err != nil {
 | 
			
		||||
		err = fmt.Errorf("could not marshall %T to JSON for logging: %w", v, err)
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -55,7 +55,7 @@ func ScrubProcessParameters(s string) (string, error) {
 | 
			
		||||
	}
 | 
			
		||||
	pp.Environment = map[string]string{_scrubbedReplacement: _scrubbedReplacement}
 | 
			
		||||
 | 
			
		||||
	b, err := encodeBuffer(bytes.NewBuffer(b[:0]), pp)
 | 
			
		||||
	b, err := encode(pp)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/cimfs.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/cimfs.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
package winapi
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"unsafe"
 | 
			
		||||
 | 
			
		||||
	"github.com/Microsoft/go-winio/pkg/guid"
 | 
			
		||||
	"golang.org/x/sys/windows"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type g = guid.GUID
 | 
			
		||||
type FsHandle uintptr
 | 
			
		||||
type StreamHandle uintptr
 | 
			
		||||
 | 
			
		||||
type CimFsFileMetadata struct {
 | 
			
		||||
	Attributes uint32
 | 
			
		||||
	FileSize   int64
 | 
			
		||||
 | 
			
		||||
	CreationTime   windows.Filetime
 | 
			
		||||
	LastWriteTime  windows.Filetime
 | 
			
		||||
	ChangeTime     windows.Filetime
 | 
			
		||||
	LastAccessTime windows.Filetime
 | 
			
		||||
 | 
			
		||||
	SecurityDescriptorBuffer unsafe.Pointer
 | 
			
		||||
	SecurityDescriptorSize   uint32
 | 
			
		||||
 | 
			
		||||
	ReparseDataBuffer unsafe.Pointer
 | 
			
		||||
	ReparseDataSize   uint32
 | 
			
		||||
 | 
			
		||||
	ExtendedAttributes unsafe.Pointer
 | 
			
		||||
	EACount            uint32
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//sys CimMountImage(imagePath string, fsName string, flags uint32, volumeID *g) (hr error) = cimfs.CimMountImage?
 | 
			
		||||
//sys CimDismountImage(volumeID *g) (hr error) = cimfs.CimDismountImage?
 | 
			
		||||
 | 
			
		||||
//sys CimCreateImage(imagePath string, oldFSName *uint16, newFSName *uint16, cimFSHandle *FsHandle) (hr error) = cimfs.CimCreateImage?
 | 
			
		||||
//sys CimCloseImage(cimFSHandle FsHandle) (hr error) = cimfs.CimCloseImage?
 | 
			
		||||
//sys CimCommitImage(cimFSHandle FsHandle) (hr error) = cimfs.CimCommitImage?
 | 
			
		||||
 | 
			
		||||
//sys CimCreateFile(cimFSHandle FsHandle, path string, file *CimFsFileMetadata, cimStreamHandle *StreamHandle) (hr error) = cimfs.CimCreateFile?
 | 
			
		||||
//sys CimCloseStream(cimStreamHandle StreamHandle) (hr error) = cimfs.CimCloseStream?
 | 
			
		||||
//sys CimWriteStream(cimStreamHandle StreamHandle, buffer uintptr, bufferSize uint32) (hr error) = cimfs.CimWriteStream?
 | 
			
		||||
//sys CimDeletePath(cimFSHandle FsHandle, path string) (hr error) = cimfs.CimDeletePath?
 | 
			
		||||
//sys CimCreateHardLink(cimFSHandle FsHandle, newPath string, oldPath string) (hr error) = cimfs.CimCreateHardLink?
 | 
			
		||||
//sys CimCreateAlternateStream(cimFSHandle FsHandle, path string, size uint64, cimStreamHandle *StreamHandle) (hr error) = cimfs.CimCreateAlternateStream?
 | 
			
		||||
							
								
								
									
										6
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -80,3 +80,9 @@ func ConvertStringSetToSlice(buf []byte) ([]string, error) {
 | 
			
		||||
	}
 | 
			
		||||
	return nil, errors.New("string set malformed: missing null terminator at end of buffer")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ParseUtf16LE parses a UTF-16LE byte array into a string (without passing
 | 
			
		||||
// through a uint16 or rune array).
 | 
			
		||||
func ParseUtf16LE(b []byte) string {
 | 
			
		||||
	return windows.UTF16PtrToString((*uint16)(unsafe.Pointer(&b[0])))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										241
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/zsyscall_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										241
									
								
								vendor/github.com/Microsoft/hcsshim/internal/winapi/zsyscall_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -43,6 +43,7 @@ var (
 | 
			
		||||
	modadvapi32   = windows.NewLazySystemDLL("advapi32.dll")
 | 
			
		||||
	modbindfltapi = windows.NewLazySystemDLL("bindfltapi.dll")
 | 
			
		||||
	modcfgmgr32   = windows.NewLazySystemDLL("cfgmgr32.dll")
 | 
			
		||||
	modcimfs      = windows.NewLazySystemDLL("cimfs.dll")
 | 
			
		||||
	modiphlpapi   = windows.NewLazySystemDLL("iphlpapi.dll")
 | 
			
		||||
	modkernel32   = windows.NewLazySystemDLL("kernel32.dll")
 | 
			
		||||
	modnetapi32   = windows.NewLazySystemDLL("netapi32.dll")
 | 
			
		||||
@@ -55,6 +56,17 @@ var (
 | 
			
		||||
	procCM_Get_Device_ID_ListA                 = modcfgmgr32.NewProc("CM_Get_Device_ID_ListA")
 | 
			
		||||
	procCM_Get_Device_ID_List_SizeA            = modcfgmgr32.NewProc("CM_Get_Device_ID_List_SizeA")
 | 
			
		||||
	procCM_Locate_DevNodeW                     = modcfgmgr32.NewProc("CM_Locate_DevNodeW")
 | 
			
		||||
	procCimCloseImage                          = modcimfs.NewProc("CimCloseImage")
 | 
			
		||||
	procCimCloseStream                         = modcimfs.NewProc("CimCloseStream")
 | 
			
		||||
	procCimCommitImage                         = modcimfs.NewProc("CimCommitImage")
 | 
			
		||||
	procCimCreateAlternateStream               = modcimfs.NewProc("CimCreateAlternateStream")
 | 
			
		||||
	procCimCreateFile                          = modcimfs.NewProc("CimCreateFile")
 | 
			
		||||
	procCimCreateHardLink                      = modcimfs.NewProc("CimCreateHardLink")
 | 
			
		||||
	procCimCreateImage                         = modcimfs.NewProc("CimCreateImage")
 | 
			
		||||
	procCimDeletePath                          = modcimfs.NewProc("CimDeletePath")
 | 
			
		||||
	procCimDismountImage                       = modcimfs.NewProc("CimDismountImage")
 | 
			
		||||
	procCimMountImage                          = modcimfs.NewProc("CimMountImage")
 | 
			
		||||
	procCimWriteStream                         = modcimfs.NewProc("CimWriteStream")
 | 
			
		||||
	procSetJobCompartmentId                    = modiphlpapi.NewProc("SetJobCompartmentId")
 | 
			
		||||
	procClosePseudoConsole                     = modkernel32.NewProc("ClosePseudoConsole")
 | 
			
		||||
	procCopyFileW                              = modkernel32.NewProc("CopyFileW")
 | 
			
		||||
@@ -164,6 +176,235 @@ func _CMLocateDevNode(pdnDevInst *uint32, pDeviceID *uint16, uFlags uint32) (hr
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCloseImage(cimFSHandle FsHandle) (hr error) {
 | 
			
		||||
	hr = procCimCloseImage.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimCloseImage.Addr(), 1, uintptr(cimFSHandle), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCloseStream(cimStreamHandle StreamHandle) (hr error) {
 | 
			
		||||
	hr = procCimCloseStream.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimCloseStream.Addr(), 1, uintptr(cimStreamHandle), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCommitImage(cimFSHandle FsHandle) (hr error) {
 | 
			
		||||
	hr = procCimCommitImage.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimCommitImage.Addr(), 1, uintptr(cimFSHandle), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCreateAlternateStream(cimFSHandle FsHandle, path string, size uint64, cimStreamHandle *StreamHandle) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(path)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimCreateAlternateStream(cimFSHandle, _p0, size, cimStreamHandle)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimCreateAlternateStream(cimFSHandle FsHandle, path *uint16, size uint64, cimStreamHandle *StreamHandle) (hr error) {
 | 
			
		||||
	hr = procCimCreateAlternateStream.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall6(procCimCreateAlternateStream.Addr(), 4, uintptr(cimFSHandle), uintptr(unsafe.Pointer(path)), uintptr(size), uintptr(unsafe.Pointer(cimStreamHandle)), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCreateFile(cimFSHandle FsHandle, path string, file *CimFsFileMetadata, cimStreamHandle *StreamHandle) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(path)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimCreateFile(cimFSHandle, _p0, file, cimStreamHandle)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimCreateFile(cimFSHandle FsHandle, path *uint16, file *CimFsFileMetadata, cimStreamHandle *StreamHandle) (hr error) {
 | 
			
		||||
	hr = procCimCreateFile.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall6(procCimCreateFile.Addr(), 4, uintptr(cimFSHandle), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(cimStreamHandle)), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCreateHardLink(cimFSHandle FsHandle, newPath string, oldPath string) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(newPath)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	var _p1 *uint16
 | 
			
		||||
	_p1, hr = syscall.UTF16PtrFromString(oldPath)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimCreateHardLink(cimFSHandle, _p0, _p1)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimCreateHardLink(cimFSHandle FsHandle, newPath *uint16, oldPath *uint16) (hr error) {
 | 
			
		||||
	hr = procCimCreateHardLink.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimCreateHardLink.Addr(), 3, uintptr(cimFSHandle), uintptr(unsafe.Pointer(newPath)), uintptr(unsafe.Pointer(oldPath)))
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimCreateImage(imagePath string, oldFSName *uint16, newFSName *uint16, cimFSHandle *FsHandle) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(imagePath)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimCreateImage(_p0, oldFSName, newFSName, cimFSHandle)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimCreateImage(imagePath *uint16, oldFSName *uint16, newFSName *uint16, cimFSHandle *FsHandle) (hr error) {
 | 
			
		||||
	hr = procCimCreateImage.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall6(procCimCreateImage.Addr(), 4, uintptr(unsafe.Pointer(imagePath)), uintptr(unsafe.Pointer(oldFSName)), uintptr(unsafe.Pointer(newFSName)), uintptr(unsafe.Pointer(cimFSHandle)), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimDeletePath(cimFSHandle FsHandle, path string) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(path)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimDeletePath(cimFSHandle, _p0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimDeletePath(cimFSHandle FsHandle, path *uint16) (hr error) {
 | 
			
		||||
	hr = procCimDeletePath.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimDeletePath.Addr(), 2, uintptr(cimFSHandle), uintptr(unsafe.Pointer(path)), 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimDismountImage(volumeID *g) (hr error) {
 | 
			
		||||
	hr = procCimDismountImage.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimDismountImage.Addr(), 1, uintptr(unsafe.Pointer(volumeID)), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimMountImage(imagePath string, fsName string, flags uint32, volumeID *g) (hr error) {
 | 
			
		||||
	var _p0 *uint16
 | 
			
		||||
	_p0, hr = syscall.UTF16PtrFromString(imagePath)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	var _p1 *uint16
 | 
			
		||||
	_p1, hr = syscall.UTF16PtrFromString(fsName)
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	return _CimMountImage(_p0, _p1, flags, volumeID)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _CimMountImage(imagePath *uint16, fsName *uint16, flags uint32, volumeID *g) (hr error) {
 | 
			
		||||
	hr = procCimMountImage.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall6(procCimMountImage.Addr(), 4, uintptr(unsafe.Pointer(imagePath)), uintptr(unsafe.Pointer(fsName)), uintptr(flags), uintptr(unsafe.Pointer(volumeID)), 0, 0)
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func CimWriteStream(cimStreamHandle StreamHandle, buffer uintptr, bufferSize uint32) (hr error) {
 | 
			
		||||
	hr = procCimWriteStream.Find()
 | 
			
		||||
	if hr != nil {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procCimWriteStream.Addr(), 3, uintptr(cimStreamHandle), uintptr(buffer), uintptr(bufferSize))
 | 
			
		||||
	if int32(r0) < 0 {
 | 
			
		||||
		if r0&0x1fff0000 == 0x00070000 {
 | 
			
		||||
			r0 &= 0xffff
 | 
			
		||||
		}
 | 
			
		||||
		hr = syscall.Errno(r0)
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func SetJobCompartmentId(handle windows.Handle, compartmentId uint32) (win32Err error) {
 | 
			
		||||
	r0, _, _ := syscall.Syscall(procSetJobCompartmentId.Addr(), 2, uintptr(handle), uintptr(compartmentId), 0)
 | 
			
		||||
	if r0 != 0 {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/Microsoft/hcsshim/osversion/osversion_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -5,6 +5,7 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
 | 
			
		||||
	"golang.org/x/sys/windows"
 | 
			
		||||
	"golang.org/x/sys/windows/registry"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// OSVersion is a wrapper for Windows version information
 | 
			
		||||
@@ -57,3 +58,18 @@ func (osv OSVersion) String() string {
 | 
			
		||||
func (osv OSVersion) ToString() string {
 | 
			
		||||
	return osv.String()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Running `cmd /c ver` shows something like "10.0.20348.1000". The last component ("1000") is the revision
 | 
			
		||||
// number
 | 
			
		||||
func BuildRevision() (uint32, error) {
 | 
			
		||||
	k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return 0, fmt.Errorf("open `CurrentVersion` registry key: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
	defer k.Close()
 | 
			
		||||
	s, _, err := k.GetIntegerValue("UBR")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return 0, fmt.Errorf("read `UBR` from registry: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
	return uint32(s), nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								vendor/github.com/Microsoft/hcsshim/tools.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								vendor/github.com/Microsoft/hcsshim/tools.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,13 +0,0 @@
 | 
			
		||||
//go:build tools
 | 
			
		||||
 | 
			
		||||
package hcsshim
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	// for go generate directives
 | 
			
		||||
 | 
			
		||||
	// generate Win32 API code
 | 
			
		||||
	_ "github.com/Microsoft/go-winio/tools/mkwinsyscall"
 | 
			
		||||
 | 
			
		||||
	// mock gRPC client and servers
 | 
			
		||||
	_ "github.com/golang/mock/mockgen"
 | 
			
		||||
)
 | 
			
		||||
		Reference in New Issue
	
	Block a user