unix: add RND* ioctl consts on Linux

Change-Id: I79c721d0f4fe097daf096dc7404675aa3048bf6a
Reviewed-on: https://go-review.googlesource.com/c/160757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/linux/types.go b/unix/linux/types.go
index 3d53484..ee87081 100644
--- a/unix/linux/types.go
+++ b/unix/linux/types.go
@@ -752,8 +752,6 @@
 
 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 c1e5ca5..2268e8b 100755
--- a/unix/mkerrors.sh
+++ b/unix/mkerrors.sh
@@ -482,6 +482,7 @@
 		$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 63db57d..3048da1 100644
--- a/unix/zerrors_linux_386.go
+++ b/unix/zerrors_linux_386.go
@@ -1537,6 +1537,13 @@
 	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 d9d1369..9f107a8 100644
--- a/unix/zerrors_linux_amd64.go
+++ b/unix/zerrors_linux_amd64.go
@@ -1538,6 +1538,13 @@
 	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 ad74323..880d9fc 100644
--- a/unix/zerrors_linux_arm.go
+++ b/unix/zerrors_linux_arm.go
@@ -1544,6 +1544,13 @@
 	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 47168e4..cffe094 100644
--- a/unix/zerrors_linux_arm64.go
+++ b/unix/zerrors_linux_arm64.go
@@ -1528,6 +1528,13 @@
 	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 a9ddc67..fcdcfaa 100644
--- a/unix/zerrors_linux_mips.go
+++ b/unix/zerrors_linux_mips.go
@@ -1537,6 +1537,13 @@
 	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 71028ee..8a27b2a 100644
--- a/unix/zerrors_linux_mips64.go
+++ b/unix/zerrors_linux_mips64.go
@@ -1537,6 +1537,13 @@
 	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 35359da..6b00bb4 100644
--- a/unix/zerrors_linux_mips64le.go
+++ b/unix/zerrors_linux_mips64le.go
@@ -1537,6 +1537,13 @@
 	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 79c57b4..aadfad3 100644
--- a/unix/zerrors_linux_mipsle.go
+++ b/unix/zerrors_linux_mipsle.go
@@ -1537,6 +1537,13 @@
 	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 0da85e5..283ff2d 100644
--- a/unix/zerrors_linux_ppc64.go
+++ b/unix/zerrors_linux_ppc64.go
@@ -1595,6 +1595,13 @@
 	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 ee283c9..a8d1ad8 100644
--- a/unix/zerrors_linux_ppc64le.go
+++ b/unix/zerrors_linux_ppc64le.go
@@ -1595,6 +1595,13 @@
 	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 21b2809..9846bd9 100644
--- a/unix/zerrors_linux_riscv64.go
+++ b/unix/zerrors_linux_riscv64.go
@@ -1525,6 +1525,13 @@
 	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 1895b10..21a3bc4 100644
--- a/unix/zerrors_linux_s390x.go
+++ b/unix/zerrors_linux_s390x.go
@@ -1598,6 +1598,13 @@
 	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 00a0b1e..309e1fa 100644
--- a/unix/zerrors_linux_sparc64.go
+++ b/unix/zerrors_linux_sparc64.go
@@ -1590,6 +1590,13 @@
 	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 f4ee3d2..aab0051 100644
--- a/unix/ztypes_linux_386.go
+++ b/unix/ztypes_linux_386.go
@@ -779,8 +779,6 @@
 	_       [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 0c2059b..f1bc69d 100644
--- a/unix/ztypes_linux_amd64.go
+++ b/unix/ztypes_linux_amd64.go
@@ -792,8 +792,6 @@
 	_       [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 370f158..a716dcb 100644
--- a/unix/ztypes_linux_arm.go
+++ b/unix/ztypes_linux_arm.go
@@ -768,8 +768,6 @@
 	_       [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 ae67a6b..32af3d2 100644
--- a/unix/ztypes_linux_arm64.go
+++ b/unix/ztypes_linux_arm64.go
@@ -771,8 +771,6 @@
 	_       [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 4de89fa..73de572 100644
--- a/unix/ztypes_linux_mips.go
+++ b/unix/ztypes_linux_mips.go
@@ -773,8 +773,6 @@
 	_       [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 4a29941..03842b0 100644
--- a/unix/ztypes_linux_mips64.go
+++ b/unix/ztypes_linux_mips64.go
@@ -773,8 +773,6 @@
 	_       [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 070bb0a..33a28ec 100644
--- a/unix/ztypes_linux_mips64le.go
+++ b/unix/ztypes_linux_mips64le.go
@@ -773,8 +773,6 @@
 	_       [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 4e2a0ea..7e07a31 100644
--- a/unix/ztypes_linux_mipsle.go
+++ b/unix/ztypes_linux_mipsle.go
@@ -773,8 +773,6 @@
 	_       [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 a97626c..f2218cb 100644
--- a/unix/ztypes_linux_ppc64.go
+++ b/unix/ztypes_linux_ppc64.go
@@ -781,8 +781,6 @@
 	_       [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 a439935..c16f849 100644
--- a/unix/ztypes_linux_ppc64le.go
+++ b/unix/ztypes_linux_ppc64le.go
@@ -781,8 +781,6 @@
 	_       [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 a4022bd..18d9a0e 100644
--- a/unix/ztypes_linux_riscv64.go
+++ b/unix/ztypes_linux_riscv64.go
@@ -798,8 +798,6 @@
 	_       [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 e3b48d1..47187b5 100644
--- a/unix/ztypes_linux_s390x.go
+++ b/unix/ztypes_linux_s390x.go
@@ -794,8 +794,6 @@
 	_       [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 f402c7d..859ef97 100644
--- a/unix/ztypes_linux_sparc64.go
+++ b/unix/ztypes_linux_sparc64.go
@@ -776,8 +776,6 @@
 	_       [48]uint8
 }
 
-const RNDGETENTCNT = 0x40045200
-
 const PERF_IOC_FLAG_GROUP = 0x1
 
 type Termios struct {