1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
11 // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
13 // To change fd's window size, the req argument should be TIOCSWINSZ.
14 func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
15 // TODO: if we get the chance, remove the req parameter and
16 // hardcode TIOCSWINSZ.
17 err := ioctlSetWinsize(fd, req, value)
18 runtime.KeepAlive(value)
22 // IoctlSetTermios performs an ioctl on fd with a *Termios.
24 // The req value will usually be TCSETA or TIOCSETA.
25 func IoctlSetTermios(fd int, req uint, value *Termios) error {
26 // TODO: if we get the chance, remove the req parameter.
27 err := ioctlSetTermios(fd, req, value)
28 runtime.KeepAlive(value)