Files
creack.pty/ioctl.go
Yuval Pavel Zholkover 88e4fdb5b4 Portable ioctl calls
Add _IOC macros (<sys/ioccom.h>, <asm-generic/ioctl.h>) for linux and bsd's, unify ioctl() calls.
FreeBSD: use modern pts(4) interface instead of the old pty(4) one
2014-03-14 17:28:51 +02:00

12 lines
174 B
Go

package pty
import "syscall"
func ioctl(fd, cmd, ptr uintptr) error {
_, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr)
if e != 0 {
return e
}
return nil
}