mirror of
https://github.com/creack/pty.git
synced 2026-03-31 10:37:09 +09:00
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
12 lines
174 B
Go
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
|
|
}
|