github.com/guyezi/gofrontend@v0.0.0-20200228202240-7a62a49e62c0/libgo/go/internal/syscall/unix/ioctl_aix.go (about) 1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package unix 6 7 import ( 8 "syscall" 9 "unsafe" 10 ) 11 12 //extern __go_ioctl_ptr 13 func ioctl(int32, int32, unsafe.Pointer) int32 14 15 func Ioctl(fd int, cmd int, args uintptr) (err error) { 16 if ioctl(int32(fd), int32(cmd), unsafe.Pointer(args)) < 0 { 17 return syscall.GetErrno() 18 } 19 return 20 }