Fix windows build for client

Move io copy logic from ctr utils to io_windows.go.
Fix compilation errors on Windows.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-05-30 16:56:46 -07:00
parent 5e82767d9d
commit b1a45c2aee
7 changed files with 173 additions and 67 deletions

View File

@@ -22,7 +22,6 @@ func createDefaultSpec() (*specs.Spec, error) {
},
Root: specs.Root{},
Process: specs.Process{
Env: config.Env,
ConsoleSize: specs.Box{
Width: 80,
Height: 20,
@@ -70,10 +69,10 @@ func WithImageConfig(ctx context.Context, i Image) SpecOpts {
}
func WithTTY(width, height int) SpecOpts {
func(s *specs.Spec) error {
return func(s *specs.Spec) error {
s.Process.Terminal = true
s.Process.ConsoleSize.Width = width
s.Process.ConsoleSize.Height = height
s.Process.ConsoleSize.Width = uint(width)
s.Process.ConsoleSize.Height = uint(height)
return nil
}
}