You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

syscall_hurd.go 650B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2022 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. //go:build hurd
  5. // +build hurd
  6. package unix
  7. /*
  8. #include <stdint.h>
  9. int ioctl(int, unsigned long int, uintptr_t);
  10. */
  11. import "C"
  12. func ioctl(fd int, req uint, arg uintptr) (err error) {
  13. r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
  14. if r0 == -1 && er != nil {
  15. err = er
  16. }
  17. return
  18. }
  19. func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
  20. r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
  21. if r0 == -1 && er != nil {
  22. err = er
  23. }
  24. return
  25. }