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

12 Коммитов

Автор SHA1 Сообщение Дата
Tobias Klauser 679a27dec1 unix: add SysctlUvmexp on OpenBSD
OpenBSD uses sysctl with struct uvmexp to get information from the
virtual memory system of the kernel. Add type Uvmexp and the
SysctlUvmexp function to query this information.

This will be used in github.com/tklauser/go-sysconf to get
_SC_AVPHYS_PAGES on OpenBSD.

Change-Id: I96ded2d1be37e5307bab55e79b13234cc93d21e6
Reviewed-on: https://go-review.googlesource.com/c/139278
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-03 14:57:07 +00:00
Tobias Klauser b09afc3d57 unix: add MNT_* flags on OpenBSD
Now that all BSDs define MNT_NOWAIT, use it in TestGetfsstat instead of
the locally defined copy.

Change-Id: Ib6cee08a6d3a034464c7b79591605b49889a46ae
Reviewed-on: https://go-review.googlesource.com/137195
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-09-25 11:27:36 +00:00
Tobias Klauser 57f5ac0287 unix: add additional file mode bit constants from sys/stat.h on OpenBSD
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_openbsd.go

Change-Id: I7750ae3cb1e923a13e0035d58d58a81c35e7e86b
Reviewed-on: https://go-review.googlesource.com/128775
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-08-10 06:36:40 +00:00
Mark Pulford 34b17bdb43 unix: fix OpenBSD codegen to include F_OK
F_OK is used with access(2), but it was removed for openbsd/amd64 when
generated code was updated to OpenBSD 6.3 in 7f59abf3.

Fixes golang/go#26593

Change-Id: I4a542506b1045f0c860bb3137c4d81149a5e1cae
Reviewed-on: https://go-review.googlesource.com/126635
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-08-06 08:24:29 +00:00
Filippo Valsorda 7f59abf37b unix: update openbsd/amd64 to OpenBSD 6.3
Change-Id: I0a16c77437e4ed68cc19eda41bb9b64ab4376fd0
Reviewed-on: https://go-review.googlesource.com/114075
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-05-22 14:59:51 +00:00
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 378d26f466 unix: add CRTSCTS on netbsd and openbsd
Fixes golang/go#8760

Change-Id: Iacb5802ce6256fc5fb61b558f2d0bc0dcf593c96
Reviewed-on: https://go-review.googlesource.com/103355
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29 13:18:31 +00:00
Tobias Klauser 19b530ce1b unix: add Uname on openbsd
Change-Id: I40f99aab912c7002d113f82ccc60c9f68b9bc496
Reviewed-on: https://go-review.googlesource.com/82855
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-08 14:40:20 +00:00
Shenghou Ma 379497e3ff unix: add explicit build tags
Change-Id: I62774b8ee0c1a7cc1a3b7009ca860e3fd64a6564
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/10182
Reviewed-by: Rob Pike <r@golang.org>
2015-05-18 19:15:57 +00:00
Rob Pike dc3c21c62b go.sys/unix: use syscall.Errno for errors
If we use a local type, it won't compare properly with errors from
the rest of the standard library. Errors are the one type from syscall
that propagates through the system, so it's important to have only
one type for them.

Ditto for syscall.Signal.

LGTM=dave
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/123490043
2014-08-15 09:57:24 -07:00
Rob Pike 8442dd2c63 go.sys: update package names
Semi-automatic migration from package syscall to package {plan9,windows,unix}.
No builds attempted yet, but this gets a lot of noise behind us so subsequent
CLs will be more concise and easier to follow.
Subsequent CLs will have semantic content.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/121520043
2014-08-11 15:58:26 -07:00
Rob Pike 20acc5cf31 go.sys: copy files from syscall package to go.sys/{plan9,windows,unix}
This CL copies to each package of go.sys the files from syscall it will need.
Different directories have different files, but these:
        mkall.sh
        str.go
        syscall.go
        mksyscall.pl
        race.go
        race0.go
        syscall_test.go
are copied to all three.
No changes yet, these are just copies. They are not ready to use yet:
package names are wrong, for starters. But this clean copy will make
it easier to follow the changes as the packages are enabled.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/126960043
2014-08-11 14:48:46 -07:00