Skip to content

Commit

Permalink
unix: use errnoErr in generated wrappers on solaris
Browse files Browse the repository at this point in the history
To prevent allocations at runtime for common errno values (EAGAIN,
EINVAL, ENOENT).

This was omitted from CL 8190 because the solaris port was broken
otherwise at that time.

Change-Id: I6061d071dddf34d0fd022e0ecfb854b01c56b723
Reviewed-on: https://go-review.googlesource.com/c/sys/+/528375
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
tklauser authored and gopherbot committed Sep 14, 2023
1 parent f3ef2d1 commit a26c6de
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 134 deletions.
2 changes: 1 addition & 1 deletion unix/mksyscall_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func main() {

if doErrno {
text += "\tif e1 != 0 {\n"
text += "\t\terr = e1\n"
text += "\t\terr = errnoErr(e1)\n"
text += "\t}\n"
}
text += "\treturn\n"
Expand Down
10 changes: 5 additions & 5 deletions unix/zsyscall_illumos_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a26c6de

Please sign in to comment.