f6541cfd80
full diff: https://github.com/moby/term/compare/063f2cd0b49dbb0752774d1cb649998d91424fea...73f35e472e8f0a3f91347164138ce6bd73b756a9 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
21 lines
425 B
Go
21 lines
425 B
Go
// +build !windows,!illumos,!solaris
|
|
|
|
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
|
|
}
|