From afcc84fd7533758f95a6e93ae710aa945a0b7e73 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 1 Feb 2019 10:18:11 +0100 Subject: [PATCH] unix: add RND* ioctl consts on Linux Change-Id: I79c721d0f4fe097daf096dc7404675aa3048bf6a Reviewed-on: https://go-review.googlesource.com/c/160757 Run-TryBot: Tobias Klauser Reviewed-by: Ian Lance Taylor --- unix/linux/types.go | 2 -- unix/mkerrors.sh | 1 + unix/zerrors_linux_386.go | 7 +++++++ unix/zerrors_linux_amd64.go | 7 +++++++ unix/zerrors_linux_arm.go | 7 +++++++ unix/zerrors_linux_arm64.go | 7 +++++++ unix/zerrors_linux_mips.go | 7 +++++++ unix/zerrors_linux_mips64.go | 7 +++++++ unix/zerrors_linux_mips64le.go | 7 +++++++ unix/zerrors_linux_mipsle.go | 7 +++++++ unix/zerrors_linux_ppc64.go | 7 +++++++ unix/zerrors_linux_ppc64le.go | 7 +++++++ unix/zerrors_linux_riscv64.go | 7 +++++++ unix/zerrors_linux_s390x.go | 7 +++++++ unix/zerrors_linux_sparc64.go | 7 +++++++ unix/ztypes_linux_386.go | 2 -- unix/ztypes_linux_amd64.go | 2 -- unix/ztypes_linux_arm.go | 2 -- unix/ztypes_linux_arm64.go | 2 -- unix/ztypes_linux_mips.go | 2 -- unix/ztypes_linux_mips64.go | 2 -- unix/ztypes_linux_mips64le.go | 2 -- unix/ztypes_linux_mipsle.go | 2 -- unix/ztypes_linux_ppc64.go | 2 -- unix/ztypes_linux_ppc64le.go | 2 -- unix/ztypes_linux_riscv64.go | 2 -- unix/ztypes_linux_s390x.go | 2 -- unix/ztypes_linux_sparc64.go | 2 -- 28 files changed, 92 insertions(+), 28 deletions(-) diff --git a/unix/linux/types.go b/unix/linux/types.go index 3d53484f..ee870811 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -752,8 +752,6 @@ type Sigset_t C.sigset_t type SignalfdSiginfo C.struct_signalfd_siginfo -const RNDGETENTCNT = C.RNDGETENTCNT - const PERF_IOC_FLAG_GROUP = C.PERF_IOC_FLAG_GROUP // Terminal handling diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index c1e5ca5d..2268e8be 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh @@ -482,6 +482,7 @@ ccflags="$@" $2 ~ /^ALG_/ || $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ || $2 ~ /^GRND_/ || + $2 ~ /^RND/ || $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || $2 ~ /^KEYCTL_/ || $2 ~ /^PERF_EVENT_IOC_/ || diff --git a/unix/zerrors_linux_386.go b/unix/zerrors_linux_386.go index 63db57d9..3048da13 100644 --- a/unix/zerrors_linux_386.go +++ b/unix/zerrors_linux_386.go @@ -1537,6 +1537,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_amd64.go b/unix/zerrors_linux_amd64.go index d9d13693..9f107a89 100644 --- a/unix/zerrors_linux_amd64.go +++ b/unix/zerrors_linux_amd64.go @@ -1538,6 +1538,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_arm.go b/unix/zerrors_linux_arm.go index ad74323d..880d9fcc 100644 --- a/unix/zerrors_linux_arm.go +++ b/unix/zerrors_linux_arm.go @@ -1544,6 +1544,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_arm64.go b/unix/zerrors_linux_arm64.go index 47168e42..cffe094a 100644 --- a/unix/zerrors_linux_arm64.go +++ b/unix/zerrors_linux_arm64.go @@ -1528,6 +1528,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_mips.go b/unix/zerrors_linux_mips.go index a9ddc67a..fcdcfaae 100644 --- a/unix/zerrors_linux_mips.go +++ b/unix/zerrors_linux_mips.go @@ -1537,6 +1537,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_mips64.go b/unix/zerrors_linux_mips64.go index 71028ee5..8a27b2a7 100644 --- a/unix/zerrors_linux_mips64.go +++ b/unix/zerrors_linux_mips64.go @@ -1537,6 +1537,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_mips64le.go b/unix/zerrors_linux_mips64le.go index 35359dae..6b00bb4f 100644 --- a/unix/zerrors_linux_mips64le.go +++ b/unix/zerrors_linux_mips64le.go @@ -1537,6 +1537,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_mipsle.go b/unix/zerrors_linux_mipsle.go index 79c57b40..aadfad32 100644 --- a/unix/zerrors_linux_mipsle.go +++ b/unix/zerrors_linux_mipsle.go @@ -1537,6 +1537,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_ppc64.go b/unix/zerrors_linux_ppc64.go index 0da85e5c..283ff2de 100644 --- a/unix/zerrors_linux_ppc64.go +++ b/unix/zerrors_linux_ppc64.go @@ -1595,6 +1595,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_ppc64le.go b/unix/zerrors_linux_ppc64le.go index ee283c9c..a8d1ad8c 100644 --- a/unix/zerrors_linux_ppc64le.go +++ b/unix/zerrors_linux_ppc64le.go @@ -1595,6 +1595,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_riscv64.go b/unix/zerrors_linux_riscv64.go index 21b28096..9846bd90 100644 --- a/unix/zerrors_linux_riscv64.go +++ b/unix/zerrors_linux_riscv64.go @@ -1525,6 +1525,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_s390x.go b/unix/zerrors_linux_s390x.go index 1895b107..21a3bc4e 100644 --- a/unix/zerrors_linux_s390x.go +++ b/unix/zerrors_linux_s390x.go @@ -1598,6 +1598,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x40085203 + RNDADDTOENTCNT = 0x40045201 + RNDCLEARPOOL = 0x5206 + RNDGETENTCNT = 0x80045200 + RNDGETPOOL = 0x80085202 + RNDRESEEDCRNG = 0x5207 + RNDZAPENTCNT = 0x5204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/zerrors_linux_sparc64.go b/unix/zerrors_linux_sparc64.go index 00a0b1ee..309e1fa5 100644 --- a/unix/zerrors_linux_sparc64.go +++ b/unix/zerrors_linux_sparc64.go @@ -1590,6 +1590,13 @@ const ( RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff + RNDADDENTROPY = 0x80085203 + RNDADDTOENTCNT = 0x80045201 + RNDCLEARPOOL = 0x20005206 + RNDGETENTCNT = 0x40045200 + RNDGETPOOL = 0x40085202 + RNDRESEEDCRNG = 0x20005207 + RNDZAPENTCNT = 0x20005204 RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index f4ee3d2a..aab0051d 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -779,8 +779,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 0c2059b4..f1bc69da 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -792,8 +792,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 370f158d..a716dcbe 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -768,8 +768,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index ae67a6b2..32af3d26 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -771,8 +771,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 4de89faa..73de572b 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -773,8 +773,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index 4a299414..03842b00 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -773,8 +773,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index 070bb0a4..33a28ec7 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -773,8 +773,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index 4e2a0eaf..7e07a319 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -773,8 +773,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index a97626cd..f2218cb2 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -781,8 +781,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index a439935e..c16f8497 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -781,8 +781,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_riscv64.go b/unix/ztypes_linux_riscv64.go index a4022bdb..18d9a0e8 100644 --- a/unix/ztypes_linux_riscv64.go +++ b/unix/ztypes_linux_riscv64.go @@ -798,8 +798,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index e3b48d14..47187b5e 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -794,8 +794,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x80045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct { diff --git a/unix/ztypes_linux_sparc64.go b/unix/ztypes_linux_sparc64.go index f402c7d7..859ef97e 100644 --- a/unix/ztypes_linux_sparc64.go +++ b/unix/ztypes_linux_sparc64.go @@ -776,8 +776,6 @@ type SignalfdSiginfo struct { _ [48]uint8 } -const RNDGETENTCNT = 0x40045200 - const PERF_IOC_FLAG_GROUP = 0x1 type Termios struct {