mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-12-24 12:57:56 +08:00
Add ioctl package
This commit is contained in:
14
pkg/ioctl/ioctl_linux.go
Normal file
14
pkg/ioctl/ioctl_linux.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package ioctl
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func Ioctl(fd int, req uint, arg unsafe.Pointer) error {
|
||||
_, _, err := syscall.Syscall(syscall.SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user