summaryrefslogtreecommitdiff
path: root/vendor/github.com/moby/term/tc.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/moby/term/tc.go')
-rw-r--r--vendor/github.com/moby/term/tc.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/moby/term/tc.go b/vendor/github.com/moby/term/tc.go
new file mode 100644
index 000000000..65556027a
--- /dev/null
+++ b/vendor/github.com/moby/term/tc.go
@@ -0,0 +1,19 @@
+// +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)
+}