mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 08:37:31 -04:00
unix: add ioctl functions on NetBSD
Add IoctlGetInt/IoctlSetInt, IoctlGetTermios/IoctlSetTermios and IoctlGetWinsize/IoctlSetWinsize on NetBSD. These are similar to the already existing implementations on Linux, Darwin and Solaris. Change-Id: I6c38d946b9f461c8e4c6c5e044aaff9b37e4b02f Reviewed-on: https://go-review.googlesource.com/76171 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
5404d63da1
commit
d4266bc12a
@@ -406,6 +406,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
||||
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Access(path string, mode uint32) (err error) {
|
||||
var _p0 *byte
|
||||
_p0, err = BytePtrFromString(path)
|
||||
|
||||
Reference in New Issue
Block a user