From 1aad74a347ff39c0bdde5260042edf086e052d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Mon, 17 Mar 2025 19:04:43 -0400 Subject: [PATCH] internal/linux: Fix missing export comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- internal/linux/ioctls.go | 9 +++++++-- internal/linux/socket_linux_cgo.go | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/linux/ioctls.go b/internal/linux/ioctls.go index a6bdd363e..8e5ed30d0 100644 --- a/internal/linux/ioctls.go +++ b/internal/linux/ioctls.go @@ -8,7 +8,12 @@ package linux import "C" const ( + // IoctlBtrfsSetReceivedSubvol matches BTRFS_IOC_SET_RECEIVED_SUBVOL. IoctlBtrfsSetReceivedSubvol = C.BTRFS_IOC_SET_RECEIVED_SUBVOL - IoctlHIDIOCGrawInfo = C.HIDIOCGRAWINFO - IoctlVhostVsockSetGuestCid = C.VHOST_VSOCK_SET_GUEST_CID + + // IoctlHIDIOCGrawInfo matches HIDIOCGRAWINFO. + IoctlHIDIOCGrawInfo = C.HIDIOCGRAWINFO + + // IoctlVhostVsockSetGuestCid matches VHOST_VSOCK_SET_GUEST_CID. + IoctlVhostVsockSetGuestCid = C.VHOST_VSOCK_SET_GUEST_CID ) diff --git a/internal/linux/socket_linux_cgo.go b/internal/linux/socket_linux_cgo.go index bc98953c1..eda8f0fb8 100644 --- a/internal/linux/socket_linux_cgo.go +++ b/internal/linux/socket_linux_cgo.go @@ -101,7 +101,10 @@ func PidfdSendSignal(Pidfd int, Signal int, Flags uint32) error { } const ( + // CLOSE_RANGE_UNSHARE matches CLOSE_RANGE_UNSHARE flag. CLOSE_RANGE_UNSHARE uint32 = C.CLOSE_RANGE_UNSHARE + + // CLOSE_RANGE_CLOEXEC matches CLOSE_RANGE_CLOEXEC flag. CLOSE_RANGE_CLOEXEC uint32 = C.CLOSE_RANGE_CLOEXEC )