mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-04 07:49:35 +00:00 
			
		
		
		
	Updating dependency github.com/containerd/console to version v0.0.0-20180822173158-c12b1e7919c1
This commit is contained in:
		
							
								
								
									
										10
									
								
								vendor/github.com/containerd/console/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/containerd/console/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,17 +1,19 @@
 | 
			
		||||
language: go
 | 
			
		||||
go:
 | 
			
		||||
  - 1.9.x
 | 
			
		||||
  - tip
 | 
			
		||||
  - "1.10.x"
 | 
			
		||||
 | 
			
		||||
go_import_path: github.com/containerd/console
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
  - go get -d
 | 
			
		||||
  - GOOS=windows go get -d
 | 
			
		||||
  - GOOS=openbsd go get -d
 | 
			
		||||
  - GOOS=solaris go get -d
 | 
			
		||||
  - GOOS=windows go get -d
 | 
			
		||||
 | 
			
		||||
script:
 | 
			
		||||
  - go test -race
 | 
			
		||||
  - GOOS=windows go test
 | 
			
		||||
  - GOOS=openbsd go build
 | 
			
		||||
  - GOOS=openbsd go test -c
 | 
			
		||||
  - GOOS=solaris go build
 | 
			
		||||
  - GOOS=solaris go test -c
 | 
			
		||||
  - GOOS=windows go test
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								vendor/github.com/containerd/console/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/containerd/console/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -10,6 +10,8 @@ go_library(
 | 
			
		||||
        "tc_darwin.go",
 | 
			
		||||
        "tc_freebsd.go",
 | 
			
		||||
        "tc_linux.go",
 | 
			
		||||
        "tc_openbsd_cgo.go",
 | 
			
		||||
        "tc_openbsd_nocgo.go",
 | 
			
		||||
        "tc_solaris_cgo.go",
 | 
			
		||||
        "tc_solaris_nocgo.go",
 | 
			
		||||
        "tc_unix.go",
 | 
			
		||||
@@ -34,6 +36,9 @@ go_library(
 | 
			
		||||
        "@io_bazel_rules_go//go/platform:linux": [
 | 
			
		||||
            "//vendor/golang.org/x/sys/unix:go_default_library",
 | 
			
		||||
        ],
 | 
			
		||||
        "@io_bazel_rules_go//go/platform:openbsd": [
 | 
			
		||||
            "//vendor/golang.org/x/sys/unix:go_default_library",
 | 
			
		||||
        ],
 | 
			
		||||
        "@io_bazel_rules_go//go/platform:solaris": [
 | 
			
		||||
            "//vendor/golang.org/x/sys/unix:go_default_library",
 | 
			
		||||
        ],
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/containerd/console/console.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/containerd/console/console.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,3 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								vendor/github.com/containerd/console/console_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/containerd/console/console_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,5 +1,21 @@
 | 
			
		||||
// +build linux
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
@@ -56,7 +72,7 @@ func NewEpoller() (*Epoller, error) {
 | 
			
		||||
	}, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Add creates a epoll console based on the provided console. The console will
 | 
			
		||||
// Add creates an epoll console based on the provided console. The console will
 | 
			
		||||
// be registered with EPOLLET (i.e. using edge-triggered notification) and its
 | 
			
		||||
// file descriptor will be set to non-blocking mode. After this, user should use
 | 
			
		||||
// the return console to perform I/O.
 | 
			
		||||
@@ -118,7 +134,7 @@ func (e *Epoller) Wait() error {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Close unregister the console's file descriptor from epoll interface
 | 
			
		||||
// CloseConsole unregisters the console's file descriptor from epoll interface
 | 
			
		||||
func (e *Epoller) CloseConsole(fd int) error {
 | 
			
		||||
	e.mu.Lock()
 | 
			
		||||
	defer e.mu.Unlock()
 | 
			
		||||
@@ -133,12 +149,12 @@ func (e *Epoller) getConsole(sysfd int) *EpollConsole {
 | 
			
		||||
	return f
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Close the epoll fd
 | 
			
		||||
// Close closes the epoll fd
 | 
			
		||||
func (e *Epoller) Close() error {
 | 
			
		||||
	return unix.Close(e.efd)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// EpollConsole acts like a console but register its file descriptor with a
 | 
			
		||||
// EpollConsole acts like a console but registers its file descriptor with an
 | 
			
		||||
// epoll fd and uses epoll API to perform I/O.
 | 
			
		||||
type EpollConsole struct {
 | 
			
		||||
	Console
 | 
			
		||||
@@ -151,7 +167,7 @@ type EpollConsole struct {
 | 
			
		||||
// Read reads up to len(p) bytes into p. It returns the number of bytes read
 | 
			
		||||
// (0 <= n <= len(p)) and any error encountered.
 | 
			
		||||
//
 | 
			
		||||
// If the console's read returns EAGAIN or EIO, we assumes that its a
 | 
			
		||||
// If the console's read returns EAGAIN or EIO, we assume that it's a
 | 
			
		||||
// temporary error because the other side went away and wait for the signal
 | 
			
		||||
// generated by epoll event to continue.
 | 
			
		||||
func (ec *EpollConsole) Read(p []byte) (n int, err error) {
 | 
			
		||||
@@ -191,7 +207,7 @@ func (ec *EpollConsole) Read(p []byte) (n int, err error) {
 | 
			
		||||
// written from p (0 <= n <= len(p)) and any error encountered that caused
 | 
			
		||||
// the write to stop early.
 | 
			
		||||
//
 | 
			
		||||
// If writes to the console returns EAGAIN or EIO, we assumes that its a
 | 
			
		||||
// If writes to the console returns EAGAIN or EIO, we assume that it's a
 | 
			
		||||
// temporary error because the other side went away and wait for the signal
 | 
			
		||||
// generated by epoll event to continue.
 | 
			
		||||
func (ec *EpollConsole) Write(p []byte) (n int, err error) {
 | 
			
		||||
@@ -208,7 +224,7 @@ func (ec *EpollConsole) Write(p []byte) (n int, err error) {
 | 
			
		||||
			} else {
 | 
			
		||||
				hangup = (err == unix.EAGAIN || err == unix.EIO)
 | 
			
		||||
			}
 | 
			
		||||
			// if the other end disappear, assume this is temporary and wait for the
 | 
			
		||||
			// if the other end disappears, assume this is temporary and wait for the
 | 
			
		||||
			// signal to continue again.
 | 
			
		||||
			if hangup {
 | 
			
		||||
				ec.writec.Wait()
 | 
			
		||||
@@ -226,7 +242,7 @@ func (ec *EpollConsole) Write(p []byte) (n int, err error) {
 | 
			
		||||
	return n, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Close closed the file descriptor and signal call waiters for this fd.
 | 
			
		||||
// Shutdown closes the file descriptor and signals call waiters for this fd.
 | 
			
		||||
// It accepts a callback which will be called with the console's fd. The
 | 
			
		||||
// callback typically will be used to do further cleanup such as unregister the
 | 
			
		||||
// console's fd from the epoll interface.
 | 
			
		||||
@@ -246,10 +262,14 @@ func (ec *EpollConsole) Shutdown(close func(int) error) error {
 | 
			
		||||
 | 
			
		||||
// signalRead signals that the console is readable.
 | 
			
		||||
func (ec *EpollConsole) signalRead() {
 | 
			
		||||
	ec.readc.L.Lock()
 | 
			
		||||
	ec.readc.Signal()
 | 
			
		||||
	ec.readc.L.Unlock()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// signalWrite signals that the console is writable.
 | 
			
		||||
func (ec *EpollConsole) signalWrite() {
 | 
			
		||||
	ec.writec.L.Lock()
 | 
			
		||||
	ec.writec.Signal()
 | 
			
		||||
	ec.writec.L.Unlock()
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/github.com/containerd/console/console_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/containerd/console/console_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,4 +1,20 @@
 | 
			
		||||
// +build darwin freebsd linux solaris
 | 
			
		||||
// +build darwin freebsd linux openbsd solaris
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								vendor/github.com/containerd/console/console_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/github.com/containerd/console/console_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,3 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
@@ -134,11 +150,11 @@ func (m *master) Close() error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *master) Read(b []byte) (int, error) {
 | 
			
		||||
	panic("not implemented on windows")
 | 
			
		||||
	return os.Stdin.Read(b)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *master) Write(b []byte) (int, error) {
 | 
			
		||||
	panic("not implemented on windows")
 | 
			
		||||
	return os.Stdout.Write(b)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *master) Fd() uintptr {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/containerd/console/tc_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/containerd/console/tc_darwin.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,3 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/containerd/console/tc_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/containerd/console/tc_freebsd.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,3 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								vendor/github.com/containerd/console/tc_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/containerd/console/tc_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,3 +1,19 @@
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
@@ -13,25 +29,21 @@ const (
 | 
			
		||||
	cmdTcSet = unix.TCSETS
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func ioctl(fd, flag, data uintptr) error {
 | 
			
		||||
	if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, flag, data); err != 0 {
 | 
			
		||||
// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
 | 
			
		||||
// unlockpt should be called before opening the slave side of a pty.
 | 
			
		||||
func unlockpt(f *os.File) error {
 | 
			
		||||
	var u int32
 | 
			
		||||
	if _, _, err := unix.Syscall(unix.SYS_IOCTL, f.Fd(), unix.TIOCSPTLCK, uintptr(unsafe.Pointer(&u))); err != 0 {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
 | 
			
		||||
// unlockpt should be called before opening the slave side of a pty.
 | 
			
		||||
func unlockpt(f *os.File) error {
 | 
			
		||||
	var u int32
 | 
			
		||||
	return ioctl(f.Fd(), unix.TIOCSPTLCK, uintptr(unsafe.Pointer(&u)))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ptsname retrieves the name of the first available pts for the given master.
 | 
			
		||||
func ptsname(f *os.File) (string, error) {
 | 
			
		||||
	n, err := unix.IoctlGetInt(int(f.Fd()), unix.TIOCGPTN)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
	var u uint32
 | 
			
		||||
	if _, _, err := unix.Syscall(unix.SYS_IOCTL, f.Fd(), unix.TIOCGPTN, uintptr(unsafe.Pointer(&u))); err != 0 {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
	return fmt.Sprintf("/dev/pts/%d", n), nil
 | 
			
		||||
	return fmt.Sprintf("/dev/pts/%d", u), nil
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										51
									
								
								vendor/github.com/containerd/console/tc_openbsd_cgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								vendor/github.com/containerd/console/tc_openbsd_cgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
// +build openbsd,cgo
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"os"
 | 
			
		||||
 | 
			
		||||
	"golang.org/x/sys/unix"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//#include <stdlib.h>
 | 
			
		||||
import "C"
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	cmdTcGet = unix.TIOCGETA
 | 
			
		||||
	cmdTcSet = unix.TIOCSETA
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// ptsname retrieves the name of the first available pts for the given master.
 | 
			
		||||
func ptsname(f *os.File) (string, error) {
 | 
			
		||||
	ptspath, err := C.ptsname(C.int(f.Fd()))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
	return C.GoString(ptspath), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f.
 | 
			
		||||
// unlockpt should be called before opening the slave side of a pty.
 | 
			
		||||
func unlockpt(f *os.File) error {
 | 
			
		||||
	if _, err := C.grantpt(C.int(f.Fd())); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										47
									
								
								vendor/github.com/containerd/console/tc_openbsd_nocgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								vendor/github.com/containerd/console/tc_openbsd_nocgo.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
// +build openbsd,!cgo
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Implementing the functions below requires cgo support.  Non-cgo stubs
 | 
			
		||||
// versions are defined below to enable cross-compilation of source code
 | 
			
		||||
// that depends on these functions, but the resultant cross-compiled
 | 
			
		||||
// binaries cannot actually be used.  If the stub function(s) below are
 | 
			
		||||
// actually invoked they will display an error message and cause the
 | 
			
		||||
// calling process to exit.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"os"
 | 
			
		||||
 | 
			
		||||
	"golang.org/x/sys/unix"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	cmdTcGet = unix.TIOCGETA
 | 
			
		||||
	cmdTcSet = unix.TIOCSETA
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func ptsname(f *os.File) (string, error) {
 | 
			
		||||
	panic("ptsname() support requires cgo.")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func unlockpt(f *os.File) error {
 | 
			
		||||
	panic("unlockpt() support requires cgo.")
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/containerd/console/tc_solaris_cgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/containerd/console/tc_solaris_cgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,5 +1,21 @@
 | 
			
		||||
// +build solaris,cgo
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/github.com/containerd/console/tc_solaris_nocgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/containerd/console/tc_solaris_nocgo.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,5 +1,21 @@
 | 
			
		||||
// +build solaris,!cgo
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
//
 | 
			
		||||
// Implementing the functions below requires cgo support.  Non-cgo stubs
 | 
			
		||||
// versions are defined below to enable cross-compilation of source code
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/github.com/containerd/console/tc_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/containerd/console/tc_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,4 +1,20 @@
 | 
			
		||||
// +build darwin freebsd linux solaris
 | 
			
		||||
// +build darwin freebsd linux openbsd solaris
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
   Copyright The containerd Authors.
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package console
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user