unix: add missing const (MTDFILEMODE) from <mtd/mtd-user.h> CL 318211 added constants from <mtd/mtd-user.h>. The regex was too strict and as a result MTDFILEMODE was not included. This CL relaxes the regex so that MTDFILEMODE is included. Fixes golang/go#46448 Change-Id: I2667d1690782cf8ce98b26cb6305e7386cbd0d46 Reviewed-on: https://go-review.googlesource.com/c/sys/+/323391 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh index 2dd9013..c4e3e1e 100755 --- a/unix/mkerrors.sh +++ b/unix/mkerrors.sh
@@ -594,7 +594,7 @@ $2 == "HID_MAX_DESCRIPTOR_SIZE" || $2 ~ /^_?HIDIOC/ || $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ || - $2 ~ /^MTD_/ || + $2 ~ /^MTD/ || $2 ~ /^OTP/ || $2 ~ /^MEM/ || $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
diff --git a/unix/zerrors_linux_386.go b/unix/zerrors_linux_386.go index 33b401d..09fc559 100644 --- a/unix/zerrors_linux_386.go +++ b/unix/zerrors_linux_386.go
@@ -137,6 +137,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc00c4d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_amd64.go b/unix/zerrors_linux_amd64.go index aec8754..75730cc 100644 --- a/unix/zerrors_linux_amd64.go +++ b/unix/zerrors_linux_amd64.go
@@ -137,6 +137,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_arm.go b/unix/zerrors_linux_arm.go index e96fc5c..127cf17 100644 --- a/unix/zerrors_linux_arm.go +++ b/unix/zerrors_linux_arm.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc00c4d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_arm64.go b/unix/zerrors_linux_arm64.go index c429c48..957ca1f 100644 --- a/unix/zerrors_linux_arm64.go +++ b/unix/zerrors_linux_arm64.go
@@ -138,6 +138,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_mips.go b/unix/zerrors_linux_mips.go index aaa4871..314a205 100644 --- a/unix/zerrors_linux_mips.go +++ b/unix/zerrors_linux_mips.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_mips64.go b/unix/zerrors_linux_mips64.go index 6481641..457e8de 100644 --- a/unix/zerrors_linux_mips64.go +++ b/unix/zerrors_linux_mips64.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_mips64le.go b/unix/zerrors_linux_mips64le.go index a5a65d0..33cd28f 100644 --- a/unix/zerrors_linux_mips64le.go +++ b/unix/zerrors_linux_mips64le.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_mipsle.go b/unix/zerrors_linux_mipsle.go index 88ce266..0e085ba 100644 --- a/unix/zerrors_linux_mipsle.go +++ b/unix/zerrors_linux_mipsle.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_ppc.go b/unix/zerrors_linux_ppc.go index 98f1ef7..1b5928c 100644 --- a/unix/zerrors_linux_ppc.go +++ b/unix/zerrors_linux_ppc.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NL2 = 0x200 NL3 = 0x300
diff --git a/unix/zerrors_linux_ppc64.go b/unix/zerrors_linux_ppc64.go index 6b29a58..f3a41d6 100644 --- a/unix/zerrors_linux_ppc64.go +++ b/unix/zerrors_linux_ppc64.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NL2 = 0x200 NL3 = 0x300
diff --git a/unix/zerrors_linux_ppc64le.go b/unix/zerrors_linux_ppc64le.go index f60ca86..6a5a555 100644 --- a/unix/zerrors_linux_ppc64le.go +++ b/unix/zerrors_linux_ppc64le.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NL2 = 0x200 NL3 = 0x300
diff --git a/unix/zerrors_linux_riscv64.go b/unix/zerrors_linux_riscv64.go index 86fdffe..a4da67e 100644 --- a/unix/zerrors_linux_riscv64.go +++ b/unix/zerrors_linux_riscv64.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_s390x.go b/unix/zerrors_linux_s390x.go index de67791..a7028e0 100644 --- a/unix/zerrors_linux_s390x.go +++ b/unix/zerrors_linux_s390x.go
@@ -135,6 +135,7 @@ MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80
diff --git a/unix/zerrors_linux_sparc64.go b/unix/zerrors_linux_sparc64.go index 9ebc9d6..ed3b328 100644 --- a/unix/zerrors_linux_sparc64.go +++ b/unix/zerrors_linux_sparc64.go
@@ -140,6 +140,7 @@ MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 + MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80