mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-03 07:37:34 -04:00
unix: add ioctl functions on Dragonfly
Add IoctlGetInt/IoctlSetInt, IoctlGetTermios/IoctlSetTermios and IoctlGetWinsize/IoctlSetWinsize on Dragonfly. These are similar to the already existing implementations on Linux, Darwin and Solaris. Change-Id: I5a5a7ef69f02e01a4216779df5c927f241e5cec0 Reviewed-on: https://go-review.googlesource.com/76170 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
eae8a563e8
commit
5404d63da1
@@ -423,6 +423,16 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (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