From 530c829270bef744b3acae7891a0635874af3fd4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 17 Jan 2025 09:59:50 -0800 Subject: [PATCH] syscall: use consistent message for ESTALE on Linux For some reason the ESTALE error message differed on Linux systems. On Linux strerror normally returns "Stale file handle" for ESTALE, except possibly in the en_GB locale. The mkerrors.sh script sets LC_ALL=C, so it should always produces "stale file handle". However, for some reason, several targets use "stale NFS file handle" instead. Clean this up so that we use the same string on all Linux systems. This is also consistent with golang.org/x/sys/unix. Fixes #71309 Change-Id: Ic2ffaf114c85112bc6d0831e43dd5fd2f4237bc2 Reviewed-on: https://go-review.googlesource.com/c/go/+/643335 Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Tobias Klauser --- src/syscall/zerrors_linux_386.go | 2 +- src/syscall/zerrors_linux_amd64.go | 2 +- src/syscall/zerrors_linux_arm.go | 2 +- src/syscall/zerrors_linux_mips64.go | 2 +- src/syscall/zerrors_linux_mips64le.go | 2 +- src/syscall/zerrors_linux_ppc64.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/syscall/zerrors_linux_386.go b/src/syscall/zerrors_linux_386.go index 9d4ecdeb69..05b621a2cc 100644 --- a/src/syscall/zerrors_linux_386.go +++ b/src/syscall/zerrors_linux_386.go @@ -1467,7 +1467,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale NFS file handle", + 116: "stale file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", diff --git a/src/syscall/zerrors_linux_amd64.go b/src/syscall/zerrors_linux_amd64.go index a8b67801e6..8bc322a707 100644 --- a/src/syscall/zerrors_linux_amd64.go +++ b/src/syscall/zerrors_linux_amd64.go @@ -1468,7 +1468,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale NFS file handle", + 116: "stale file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", diff --git a/src/syscall/zerrors_linux_arm.go b/src/syscall/zerrors_linux_arm.go index 285d26a561..ccbea5f287 100644 --- a/src/syscall/zerrors_linux_arm.go +++ b/src/syscall/zerrors_linux_arm.go @@ -1480,7 +1480,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale NFS file handle", + 116: "stale file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", diff --git a/src/syscall/zerrors_linux_mips64.go b/src/syscall/zerrors_linux_mips64.go index 6953c92484..7d505c7bb0 100644 --- a/src/syscall/zerrors_linux_mips64.go +++ b/src/syscall/zerrors_linux_mips64.go @@ -1744,7 +1744,7 @@ var errors = [...]string{ 148: "no route to host", 149: "operation already in progress", 150: "operation now in progress", - 151: "stale NFS file handle", + 151: "stale file handle", 158: "operation canceled", 159: "no medium found", 160: "wrong medium type", diff --git a/src/syscall/zerrors_linux_mips64le.go b/src/syscall/zerrors_linux_mips64le.go index 6953c92484..7d505c7bb0 100644 --- a/src/syscall/zerrors_linux_mips64le.go +++ b/src/syscall/zerrors_linux_mips64le.go @@ -1744,7 +1744,7 @@ var errors = [...]string{ 148: "no route to host", 149: "operation already in progress", 150: "operation now in progress", - 151: "stale NFS file handle", + 151: "stale file handle", 158: "operation canceled", 159: "no medium found", 160: "wrong medium type", diff --git a/src/syscall/zerrors_linux_ppc64.go b/src/syscall/zerrors_linux_ppc64.go index f0661a2445..fba5353b3e 100644 --- a/src/syscall/zerrors_linux_ppc64.go +++ b/src/syscall/zerrors_linux_ppc64.go @@ -1800,7 +1800,7 @@ var errors = [...]string{ 113: "no route to host", 114: "operation already in progress", 115: "operation now in progress", - 116: "stale NFS file handle", + 116: "stale file handle", 117: "structure needs cleaning", 118: "not a XENIX named type file", 119: "no XENIX semaphores available", -- 2.51.0