Add ioctl package

This commit is contained in:
Alex X
2025-03-20 20:11:40 +03:00
parent 2473eee66b
commit bad7caa187
6 changed files with 77 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package ioctl
import (
"runtime"
"testing"
"github.com/stretchr/testify/require"
)
func TestIOR(t *testing.T) {
// #define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
if runtime.GOARCH == "arm64" {
c := IOR('A', 0x01, 288)
require.Equal(t, uintptr(0x81204101), c)
}
}