mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-04 08:07:19 -04:00
unix: add ioctl functions on FreeBSD
Add IoctlGetInt/IoctlSetInt, IoctlGetTermios/IoctlSetTermios and IoctlGetWinsize/IoctlSetWinsize on FreeBSD. These are similar to the already existing implementations on Linux, Darwin and Solaris. Generated on FreeBSD 10.11-RELEASE. Change-Id: I79b273032cfeb719ec5550ac15635fd9f3231469 Reviewed-on: https://go-review.googlesource.com/52710 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Ian Lance Taylor
parent
396c9fc8fb
commit
e312636bda
@@ -278,6 +278,16 @@ func pipe() (r int, w 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