|
@@ -57,11 +57,15 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
|
|
|
|
// IoctlSetInt performs an ioctl operation which sets an integer value
|
|
// IoctlSetInt performs an ioctl operation which sets an integer value
|
|
|
// on fd, using the specified request number.
|
|
// on fd, using the specified request number.
|
|
|
-func IoctlSetInt(fd int, req uint, value int) (err error) {
|
|
|
|
|
|
|
+func IoctlSetInt(fd int, req uint, value int) error {
|
|
|
return ioctl(fd, req, uintptr(value))
|
|
return ioctl(fd, req, uintptr(value))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
|
|
|
|
|
|
|
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
|
|
|
|
|
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
|
|
|
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
|
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -73,6 +77,12 @@ func IoctlGetInt(fd int, req uint) (int, error) {
|
|
|
return value, err
|
|
return value, err
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
|
|
|
|
|
+ var value Winsize
|
|
|
|
|
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
|
|
|
|
+ return &value, err
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|
func IoctlGetTermios(fd int, req uint) (*Termios, error) {
|
|
|
var value Termios
|
|
var value Termios
|
|
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|
|
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
|