From f8f4711e3cb4c4c6f4258afac465248002259e09 Mon Sep 17 00:00:00 2001 From: songwei163 Date: Sat, 30 Aug 2025 19:27:23 +0800 Subject: [PATCH] ioctl add arm and arm64 --- pkg/ioctl/negotiation_go_arm.go | 13 +++++++++++++ pkg/ioctl/negotiation_go_arm64.go | 13 +++++++++++++ pkg/ioctl/transmission_go_arm.go | 9 +++++++++ pkg/ioctl/transmission_go_arm64.go | 9 +++++++++ 4 files changed, 44 insertions(+) create mode 100644 pkg/ioctl/negotiation_go_arm.go create mode 100644 pkg/ioctl/negotiation_go_arm64.go create mode 100644 pkg/ioctl/transmission_go_arm.go create mode 100644 pkg/ioctl/transmission_go_arm64.go diff --git a/pkg/ioctl/negotiation_go_arm.go b/pkg/ioctl/negotiation_go_arm.go new file mode 100644 index 0000000..57c3e74 --- /dev/null +++ b/pkg/ioctl/negotiation_go_arm.go @@ -0,0 +1,13 @@ +//go:build linux && !cgo && arm + +package ioctl + +// See /usr/include/linux/nbd.h + +const ( + NEGOTIATION_IOCTL_SET_SOCK = 43776 + NEGOTIATION_IOCTL_SET_BLOCKSIZE = 43777 + NEGOTIATION_IOCTL_SET_SIZE_BLOCKS = 43783 + NEGOTIATION_IOCTL_DO_IT = 43779 + NEGOTIATION_IOCTL_SET_TIMEOUT = 43785 +) diff --git a/pkg/ioctl/negotiation_go_arm64.go b/pkg/ioctl/negotiation_go_arm64.go new file mode 100644 index 0000000..980a215 --- /dev/null +++ b/pkg/ioctl/negotiation_go_arm64.go @@ -0,0 +1,13 @@ +//go:build linux && !cgo && arm64 + +package ioctl + +// See /usr/include/linux/nbd.h + +const ( + NEGOTIATION_IOCTL_SET_SOCK = 43776 + NEGOTIATION_IOCTL_SET_BLOCKSIZE = 43777 + NEGOTIATION_IOCTL_SET_SIZE_BLOCKS = 43783 + NEGOTIATION_IOCTL_DO_IT = 43779 + NEGOTIATION_IOCTL_SET_TIMEOUT = 43785 +) diff --git a/pkg/ioctl/transmission_go_arm.go b/pkg/ioctl/transmission_go_arm.go new file mode 100644 index 0000000..76e8a61 --- /dev/null +++ b/pkg/ioctl/transmission_go_arm.go @@ -0,0 +1,9 @@ +//go:build linux && !cgo && arm + +package ioctl + +const ( + TRANSMISSION_IOCTL_DISCONNECT = 43784 + TRANSMISSION_IOCTL_CLEAR_SOCK = 43780 + TRANSMISSION_IOCTL_CLEAR_QUE = 43781 +) diff --git a/pkg/ioctl/transmission_go_arm64.go b/pkg/ioctl/transmission_go_arm64.go new file mode 100644 index 0000000..b2d4b48 --- /dev/null +++ b/pkg/ioctl/transmission_go_arm64.go @@ -0,0 +1,9 @@ +//go:build linux && !cgo && arm64 + +package ioctl + +const ( + TRANSMISSION_IOCTL_DISCONNECT = 43784 + TRANSMISSION_IOCTL_CLEAR_SOCK = 43780 + TRANSMISSION_IOCTL_CLEAR_QUE = 43781 +)