d4b51a3438
no significant changes in vendored code, other than updating build-tags for go1.17, but removes some dependencies from the module, which can help with future updates; full diff: https://github.com/moby/term/compare/3f7ff695adc6...abb19827d345664b1f8d301092abf7c33bd7461e Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
21 lines
341 B
Go
21 lines
341 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package term
|
|
|
|
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
|
|
}
|
|
|
|
func tcset(fd uintptr, p *Termios) error {
|
|
return unix.IoctlSetTermios(int(fd), setTermios, p)
|
|
}
|