diff options
author | Dawid Dziurla <dawidd0811@gmail.com> | 2020-03-25 10:37:39 +0100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-25 21:26:15 +1100 |
commit | 8a06b6067ebe5b96a885c8d02b23d9d23fc8e132 (patch) | |
tree | 69534cbd4380ab151f607b4031fbfc54567b9aad /vendor/github.com/creack/pty/ioctl_solaris.go | |
parent | 2dcc52abd066c968d007114f44c55ae8205ded5a (diff) |
go mod vendor
Diffstat (limited to 'vendor/github.com/creack/pty/ioctl_solaris.go')
-rw-r--r-- | vendor/github.com/creack/pty/ioctl_solaris.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/github.com/creack/pty/ioctl_solaris.go b/vendor/github.com/creack/pty/ioctl_solaris.go new file mode 100644 index 000000000..f63985f34 --- /dev/null +++ b/vendor/github.com/creack/pty/ioctl_solaris.go @@ -0,0 +1,30 @@ +package pty + +import ( + "golang.org/x/sys/unix" + "unsafe" +) + +const ( + // see /usr/include/sys/stropts.h + I_PUSH = uintptr((int32('S')<<8 | 002)) + I_STR = uintptr((int32('S')<<8 | 010)) + I_FIND = uintptr((int32('S')<<8 | 013)) + // see /usr/include/sys/ptms.h + ISPTM = (int32('P') << 8) | 1 + UNLKPT = (int32('P') << 8) | 2 + PTSSTTY = (int32('P') << 8) | 3 + ZONEPT = (int32('P') << 8) | 4 + OWNERPT = (int32('P') << 8) | 5 +) + +type strioctl struct { + ic_cmd int32 + ic_timout int32 + ic_len int32 + ic_dp unsafe.Pointer +} + +func ioctl(fd, cmd, ptr uintptr) error { + return unix.IoctlSetInt(int(fd), uint(cmd), int(ptr)) +} |