mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-24 13:05:17 +00:00
03d1acc7b0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.24.0 to 0.25.0. - [Commits](https://github.com/golang/sys/compare/v0.24.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
31 lines
651 B
Go
31 lines
651 B
Go
// Copyright 2022 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build hurd
|
|
|
|
package unix
|
|
|
|
/*
|
|
#include <stdint.h>
|
|
int ioctl(int, unsigned long int, uintptr_t);
|
|
*/
|
|
import "C"
|
|
import "unsafe"
|
|
|
|
func ioctl(fd int, req uint, arg uintptr) (err error) {
|
|
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
|
|
if r0 == -1 && er != nil {
|
|
err = er
|
|
}
|
|
return
|
|
}
|
|
|
|
func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
|
|
r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
|
|
if r0 == -1 && er != nil {
|
|
err = er
|
|
}
|
|
return
|
|
}
|