mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4785f1a7ab
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
20 lines
407 B
Go
20 lines
407 B
Go
// +build !windows
|
|
|
|
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
|
|
}
|