k3s/vendor/github.com/moby/term/tc.go

20 lines
321 B
Go
Raw Normal View History

2020-08-10 17:43:49 +00:00
// +build !windows
package term
2020-08-10 17:43:49 +00:00
import (
"golang.org/x/sys/unix"
)
func tcget(fd uintptr) (*Termios, error) {
p, err := unix.IoctlGetTermios(int(fd), getTermios)
if err != nil {
return nil, err
}
return p, nil
2020-08-10 17:43:49 +00:00
}
func tcset(fd uintptr, p *Termios) error {
return unix.IoctlSetTermios(int(fd), setTermios, p)
2020-08-10 17:43:49 +00:00
}