Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Tobias Klauser 6f686a352d unix: add ErrnoName and SignalName
Add ErrnoName and SignalName to get errno and signal name strings from
syscall.Errno and syscall.Signal values, respectively.

This repurposes the errors and signals vars (because they are not used
within x/sys/unix currently) and turns them into slices of struct,
containing errno/signal number, name and description. ErrnoName and
SignalName can then be trivially implemented using sort.Search.

Renaming errors to errorList additionaly allows to avoid package aliases
for the errors package.

Fixes golang/go#25134

Change-Id: Ie195872793f44c437f0f175ccfaa13a2546338c5
Reviewed-on: https://go-review.googlesource.com/110875
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-05-04 06:42:12 +00:00
Tobias Klauser 0f826bdd13 unix: re-enable Capsicum on FreeBSD 386
Capsicum support was added by https://golang.org/cl/47290, but only for
amd64. This broke the freebsd/386 build which was subsequently fixed by
http://golang.org/cl/51270. However, even with this fix the tests still
fail to build due to the missing Capsicum functions and types.

Fix the build/test on freebsd/386 for real by re-running mkall.sh on
FreeBSD 11.1-RELEASE (inside VirtualBox) to get all the Capsicum
functions and types.

Some zerrors constants were removed or converted to enums in the FreeBSD
headers. Manually move them to a dedicated file. Do the same for amd64,
where these constants were removed by accident in
https://golang.org/cl/47290.

Updates golang/go#21136

Change-Id: I54fe2c4567674b07dedad677756369a43a1f0ef6
Reviewed-on: https://go-review.googlesource.com/51570
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-28 17:44:21 +00:00
Brad Fitzpatrick 02a66801d9 unix: fix FreeBSD 386 build
It was broken by https://golang.org/cl/47290

Fixes golang/go#21136

Change-Id: I2a08869fd44a9776f0dc7d461814e1df4e606b5d
Reviewed-on: https://go-review.googlesource.com/51270
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-26 18:25:55 +00:00
Ben Laurie 7a4fde3fda unix: add some FreeBSD Capsicum support.
Change-Id: Ibb1426ebd18d27ee9f144af0fd8c94b08c06f7d7
Reviewed-on: https://go-review.googlesource.com/47290
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-19 20:48:12 +00:00