Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com> Upstream-commit: 1c94c264c489e1d5fdae7f41120574e0322ab31d Component: engine
22 lines
431 B
Go
22 lines
431 B
Go
// +build !windows
|
|
// +build !solaris !cgo
|
|
|
|
package 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
|
|
}
|