4f0d95fa6e
Signed-off-by: Daniel Nephin <dnephin@docker.com>
20 lines
453 B
Go
20 lines
453 B
Go
// +build !windows
|
|
|
|
package term // import "github.com/docker/docker/pkg/term"
|
|
|
|
import (
|
|
"syscall"
|
|
"unsafe"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func tcget(fd uintptr, p *Termios) syscall.Errno {
|
|
_, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p)))
|
|
return err
|
|
}
|
|
|
|
func tcset(fd uintptr, p *Termios) syscall.Errno {
|
|
_, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p)))
|
|
return err
|
|
}
|