0
1
mirror of https://github.com/golang/go synced 2025-05-30 15:30:51 +00:00

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 

Change-Id: Ic2ffaf114c85112bc6d0831e43dd5fd2f4237bc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/643335
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Ian Lance Taylor
2025-01-17 09:59:50 -08:00
committed by Gopher Robot
parent 4160ebf28f
commit 530c829270
6 changed files with 6 additions and 6 deletions

@ -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",

@ -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",

@ -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",

@ -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",

@ -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",

@ -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",