Tobias Klauser
abf6ff7781
unix: add MCAST_* constants on linux
...
This will also add two BPF_* consts which weren't added as part of
CL 174978 because they were generated before the Linux version update
in CL 175158.
Change-Id: I5dfecbecb9d94b56d01490a5f17f2250ad5b30d4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/178658
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-05-24 12:25:48 +00:00
Lehner Florian
12bbe5a7a5
unix: add BPF constants on Linux
...
Change-Id: Ie43daa8ba56ad1e57ddbb8ddd47f83b363fe75b4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/174978
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-05-08 10:04:23 +00:00
Matt Layher
18eb32c0e2
unix: add Linux crypto configuration API constants and types
...
Change-Id: I447150cb60b5580cee77d23c0dae2244803e92ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/173660
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-04-24 17:57:32 +00:00
Dominik Honnef
c2f5717e61
unix: add fanotify API on Linux
...
This teaches unix/mksyscall.go about mapping uint64 to syscall
arguments, similar to existing handling of int64.
Change-Id: I536b4b09bbf6a8e3016565a4a04d2b9d32cbc624
Reviewed-on: https://go-review.googlesource.com/c/164664
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-03-03 19:25:50 +00:00
Tobias Klauser
41f3e65849
unix/linux: update Dockerfile to glibc 2.29 and Go 1.12beta2
...
Drop the manually defined *_XDP constants which were added to glibc.
Install python3 instead of python because glibc's confugure script now
requires at least 3.4.
Change-Id: Ic19ff4d8aa4dbadeb5438e331ccafeafc2cc9925
Reviewed-on: https://go-review.googlesource.com/c/160957
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-02-04 20:37:06 +00:00
Tobias Klauser
afcc84fd75
unix: add RND* ioctl consts on Linux
...
Change-Id: I79c721d0f4fe097daf096dc7404675aa3048bf6a
Reviewed-on: https://go-review.googlesource.com/c/160757
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2019-02-01 15:26:29 +00:00
Tobias Klauser
054c452bb7
unix: add socket error queue constants and types from linux/errqueue.h
...
Also add additional packet timestamping constants and types defined
in the same header.
Change-Id: I4280f925b46e229f4c3a83a7fee4612592314016
Reviewed-on: https://go-review.googlesource.com/c/158761
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-01-22 07:17:31 +00:00
Tobias Klauser
a457fd0364
unix: add Signalfd on linux
...
Also add the SFD_* constants and SignalfdSiginfo type.
Change-Id: I3415c212b85c9d5a940ba2bf70f43739a2630d78
Reviewed-on: https://go-review.googlesource.com/c/157897
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2019-01-15 15:29:22 +00:00
Sebastian Schmidt
2be5172556
unix: add ClockNanosleep and TIMER_ABSTIME
...
This adds the ClockNanosleep syscall and the TIMER_* constants;
currently only TIMER_ABSTIME for specifying an absolute timestamp.
Change-Id: Ic8d857eb92818529aadab569cd8646a19bb9c055
Reviewed-on: https://go-review.googlesource.com/c/157658
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2019-01-14 13:03:36 +00:00
Tobias Klauser
b4a75ba826
unix: generate linux/sparc64 go files using Docker
...
With cgo supporting sparc64 as of CL 102555 and CL 132155, the Docker
based build system can be used to generate file for linux/sparc64 as
well.
Updates golang/go#15282
Change-Id: I109e55f39d3229b24b0029c42074e439c6c54dc8
Reviewed-on: https://go-review.googlesource.com/c/102655
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-12-21 14:31:28 +00:00
David Anderson
ec83556a53
unix: add ioctl definitions for PPP interfaces.
...
Change-Id: I76b53563e3f029d1fbaad39acd5af73df278343e
GitHub-Last-Rev: b0aff54248
GitHub-Pull-Request: golang/sys#24
Reviewed-on: https://go-review.googlesource.com/c/150317
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-11-19 19:55:03 +00:00
Tobias Klauser
3a27cdcbcf
unix: don't use deprecated sys/capability.h header on FreeBSD
...
sys/capability.h is deprecated, use sys/capsicum.h instead.
Change-Id: I05a3b8ff28d4df6536a3f10e0da7381b48329738
Reviewed-on: https://go-review.googlesource.com/c/147737
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-11-06 13:43:33 +00:00
Tobias Klauser
731415f00d
unix: add kernel module load/unload syscalls on Linux
...
InitModule loads a kernel module from an ELF image. FinitModule loads a
kernel module from a file descriptor. DeleteModule unloads a kernel
module.
These syscalls require the CAP_SYS_MODULE capability.
See http://man7.org/linux/man-pages/man2/init_module.2.html and
http://man7.org/linux/man-pages/man2/delete_module.2.html for details.
Also drop deprecated syscalls related to kernel modules from the list
of unimplemented syscalls.
Change-Id: I131e17f02c5617640f5f4073982d2b27a6d78bbf
Reviewed-on: https://go-review.googlesource.com/c/144173
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-10-26 06:49:43 +00:00
Tobias Klauser
f81de40a84
unix: add KexecFileLoad on linux/{amd64,ppc64x,s390x}
...
Add a wrapper for the kexec_file_load syscall on the architectures that
implement it (amd64, ppc64x, s390x). See
http://man7.org/linux/man-pages/man2/kexec_file_load.2.html
Change-Id: Ie29f871902176610a6ba7ed0a7bcc95c10eb172b
Reviewed-on: https://go-review.googlesource.com/c/140037
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-05 13:07:39 +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
f02c79500a
unix: add MNT_* flags on DragonflyBSD
...
Change-Id: I0326a7bfcf3cd794eb1158055a8ee98a396d3b47
Reviewed-on: https://go-review.googlesource.com/136818
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-09-24 17:12:10 +00:00
Tobias Klauser
c01370cb5c
unix: add MNT_* flags on NetBSD
...
Change-Id: Ifc720a583a830883908e83bfe0e2d74c2bfa013f
Reviewed-on: https://go-review.googlesource.com/136817
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-09-24 14:20:50 +00:00
Matt Layher
d47a0f3392
unix: implement Linux AF_XDP sockets
...
Provides access to the Linux AF_XDP socket family. For more
information on AF_XDP, see:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html .
Change-Id: I7efb82c4a67da3e15932e3c0d882f0bad7ba16ef
Reviewed-on: https://go-review.googlesource.com/136695
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-09-21 16:39:48 +00:00
Tony Reix
1561086e64
unix: add Termio, Winsize, Statfs_t, TC[GS]ET, Mkdir and Mknod for AIX
...
These changes add Termio/Winsize/Statfs_t for AIX, constants TC[GS]ET and the syscalls Mkdir and Mknod.
It also changes the comments for AIX which still were talking about Linux and glibc.
Change-Id: I64325330328d6e16cff540f103fdfa533b7d8f5b
Reviewed-on: https://go-review.googlesource.com/136295
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-09-19 16:26:11 +00:00
Tobias Klauser
ee1b12c67a
unix: add MemfdCreate on Linux
...
Add a wrapper for the memfd_create syscall on Linux. See
http://man7.org/linux/man-pages/man2/memfd_create.2.html for more
information.
Also add the corresponding MFD_* constants to be used in the flags
argument.
Change-Id: Ib30a007e15575a38ecf204601ffede9c913799b6
Reviewed-on: https://go-review.googlesource.com/135915
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-09-18 15:37:33 +00:00
Tobias Klauser
ebe1bf3edb
unix: add SYNC_FILE_RANGE_* constants on Linux
...
These are usefule to specify SyncFileRange's flags argument.
Change-Id: I1726c3adf55aaebac61beed09d39a48a8e040a93
Reviewed-on: https://go-review.googlesource.com/133475
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-09-05 08:04:54 +00:00
Tony Reix
d99a578cf4
unix: code for AIX ppc and ppc64, for gccgo
...
Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-08-28 06:51:06 +00:00
Tobias Klauser
4910a1d54f
unix: add UBI ioctl constants on Linux
...
Change-Id: Icde91c6504cd45d78208c6041bf6dc097d2d8334
Reviewed-on: https://go-review.googlesource.com/131235
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-08-24 14:33:01 +00:00
Tobias Klauser
3b58ed4ad3
unix: add additional file mode bit constants from sys/stat.h on Solaris
...
Also generate the constants using mkerrors.sh instead of having to list
each of them manually in types_solaris.go
In order to avoid _*_MAGIC constants being generated, also adjust the
corresponding rule in mkerrors.sh
Change-Id: If9193b12c2a2ec3b509a324be78329fee35a240d
Reviewed-on: https://go-review.googlesource.com/130355
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-21 14:08:42 +00:00
Tobias Klauser
1c9583448a
unix: add additional file mode bit constants from sys/stat.h on FreeBSD
...
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_freebsd.go
Change-Id: I00d38d0e528900be7c5afca05c8dc50ee7628b20
Reviewed-on: https://go-review.googlesource.com/129317
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-16 05:55:13 +00:00
Tobias Klauser
871208d995
unix: add additional file mode bit constants from sys/stat.h on DragonflyBSD
...
Also generate the constants using mkerror.sh instead of having to list
each of them manually in types_dragonfly.go
Change-Id: I89b933834be6aa0eeec3d5ddbbf610e693b29327
Reviewed-on: https://go-review.googlesource.com/129316
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-16 05:53:47 +00:00
Tobias Klauser
4e1fef5609
unix: update Dockerfile to Linux 4.18, glibc 2.28 and Go 1.11beta3
...
Including linux/stat.h in mkerrors.sh is no longer necessary because the
statx types and constants were added to the glibc headers.
Change-Id: I643c35fd2da76dd2c15015556658d7fa862249c4
Reviewed-on: https://go-review.googlesource.com/129100
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-14 07:20:32 +00:00
Tobias Klauser
f0d5e33068
unix: add *xattr functions on NetBSD
...
Reuse the functions added for FreeBSD.
Change-Id: Icf5bf65c82f91147659947f6ea296dd2555724a0
Reviewed-on: https://go-review.googlesource.com/128256
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 07:02:07 +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
Tobias Klauser
2be389f392
unix: add Renameat2 on Linux
...
Renameat2 is Linux-specific and allows to pass an additional flags
argument to the renameat syscall. Also add the corresponding RENAME_*
flag mask values.
Change-Id: Ib4baa46fdd0b07ccd0988ac624862ce69d5c3ad5
Reviewed-on: https://go-review.googlesource.com/127763
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-08-06 19:25:00 +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
Casey Callendrello
3dc4335d56
unix: add Linux network namespace constants
...
This adds the NETNSA constants from net_namespace.h, used for creating
and querying network namespace IDs.
Fixes golang/go#26330
Change-Id: I786c4c4771be3eddc4fdb830a52e128aa1a2b9fd
Reviewed-on: https://go-review.googlesource.com/124436
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-08-01 22:11:39 +00:00
Michael Stapelberg
56ede360ec
unix: add rtc defines and types
...
Change-Id: I280fc3b2cd3402c40f2840d152bac2fa288f48a0
Reviewed-on: https://go-review.googlesource.com/118661
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-06-13 17:11:35 +00:00
Michael Stapelberg
31355384c8
unix: add nftables defines and types
...
Change-Id: I55efe06ec81e891ec3872405ba75c7eb9ce4e635
Reviewed-on: https://go-review.googlesource.com/114518
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-05-25 06:20:15 +00:00
Tobias Klauser
77b0e43150
unix: add symlink-safe *xattr functions on darwin
...
Updates golang/go#14456
Change-Id: I04632ef1d302e938a2cc373eb90f600f01404380
Reviewed-on: https://go-review.googlesource.com/114198
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-05-23 21:11:48 +00:00
Tobias Klauser
89da893103
unix: exclude AUDIT_RECORD_MAGIC constant on darwin
...
CL 112696 changed mkerrors.sh to add filesystem magic constants on
linux. This leads to the unrelated AUDIT_RECORD_MAGIC constant being
added on darwin. Avoid this by explicity excluding it in mkerrors.sh.
Change-Id: I5a73797e5e9a1a92cb39f96f360fdb48982a7741
Reviewed-on: https://go-review.googlesource.com/114095
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-05-22 13:13:21 +00:00
Tobias Klauser
7c87d13f8e
unix: add tpacket types and constants on Linux
...
Change-Id: I4f2fd8a7c899403f545d8dc73fec2ebbb0b322c0
Reviewed-on: https://go-review.googlesource.com/113035
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-05-14 14:36:08 +00:00
Tobias Klauser
9950ad118b
unix: add statfs and filesystem magic constants on Linux
...
Fixes golang/go#25341
Change-Id: I79cb4c77b771e005eb27d4e495ac6a7491e2e66e
Reviewed-on: https://go-review.googlesource.com/112696
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-05-11 13:39:06 +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
Matt Layher
79b0c68887
unix: add Linux block device ioctl types and constants
...
These types and constants are taken from hdreg.h, and will enable
querying and manipulation of block devices on Linux.
Fixes golang/go#24971
Change-Id: Iafe8f81ba7ab9f1e127743dab6a9fb1912874a5c
Reviewed-on: https://go-review.googlesource.com/108455
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-04-20 14:53:19 +00:00
Tobias Klauser
c1138c84af
unix: update to Linux 4.15, glibc 2.27 and Go 1.10
...
Also use the Ubuntu 17.10 docker image and additionally install bison
which is needed by the glibc build.
The resulting change only consists of a few additional constants.
Exclude the X86_CR3_PCID_NOFLUSH constant on 386 and amd64, though.
Change-Id: I0a9b8959146273ff3b259c17bb616625a9ac8278
Reviewed-on: https://go-review.googlesource.com/96255
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2018-02-22 21:03:05 +00:00
Tobias Klauser
fff93fa7cd
unix: add Statx on Linux
...
statx(2) allows to get enhanced file status information (not currently
available through the existing stat syscalls), lightweight stat,
heavyweight stat. The Statx_t type used by Statx has consistent field
sizes on all arches (with year-2038-capable timestamps) and is closer to
the BSD implementation of Stat_t.
See http://man7.org/linux/man-pages/man2/statx.2.html for details. The
syscall was added in Linux kernel 4.11.
See https://github.com/tklauser/statx for an example of how this
function and types can be used to report stat(1)-like file status
information.
Change-Id: I9e9642b5b42a393f94fd532453888ce9ba4f0003
Reviewed-on: https://go-review.googlesource.com/87555
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2018-01-15 08:58:44 +00:00
Matt Layher
b9cf5f96b6
unix: add cgroupstats type and constants
...
The cgroupstats structure is available via Linux's generic netlink
taskstats interface.
For more information, please see:
https://www.kernel.org/doc/Documentation/accounting/cgroupstats.txt .
Fixes golang/go#23388 .
Change-Id: I8a05a3875209e99a427d54049eacc98f415e44cf
Reviewed-on: https://go-review.googlesource.com/86975
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2018-01-09 18:07:26 +00:00
Tobias Klauser
665f6529cc
unix: add Uname on Darwin
...
Darwin doesn't have a uname syscall but the same information can be
retrieved using sysctls. Use the raw sysctl numbers instead of doing the
roundtrip via SysctlString in order to void the additional sysctl calls
in nametomib and SysctlRaw.
This implementation follows the one in
https://opensource.apple.com/source/Libc/Libc-1244.1.7/gen/uname.c
Change-Id: I19541e2a6700f84ced0549a8fb86faa8cb5e6fbe
Reviewed-on: https://go-review.googlesource.com/77270
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-11-13 20:21:12 +00:00
Tobias Klauser
a22539bf85
unix: add vmsockets ioctl constant on Linux
...
To be used e.g. in github.com/mdlayher/vsock
Change-Id: I52148a6e6c53c022c07e2cc8bf7348a96445c17b
Reviewed-on: https://go-review.googlesource.com/76193
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2017-11-07 15:03:14 +00:00
Tobias Klauser
46eaec7899
unix: use setattrlist for UtimesNanoAt on Darwin
...
Use to setarrlist to implement UtimesNanoAt with nanosecond precision
(on Mac OS 10.13 with APFS). Translate AT_SYMLINK_NOFOLLOW to
FSOPT_NOFOLLOW correspondingly.
Change-Id: I1468a1f4eecb53b2280ff6329b1ec64e204701f1
Reviewed-on: https://go-review.googlesource.com/75650
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-11-02 21:26:49 +00:00
Tobias Klauser
feaf45c67f
unix: use setattrlist for UtimesNano on Darwin for ns resolution
...
Follow CL 74952 for x/sys/unix.
Update golang/go#22528
Change-Id: Id146da75b80a64cfa4eac28e9bb7b3befe944718
Reviewed-on: https://go-review.googlesource.com/75610
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2017-11-02 20:14:56 +00:00
Michael Stapelberg
a57a2b53a1
unix: add watchdog constants on Linux
...
To be used e.g. in
2e60d5b8c8
Change-Id: If79ffec9021dc79375c861a0ddd9dd443adb4692
Reviewed-on: https://go-review.googlesource.com/72375
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-10-23 17:49:30 +00:00
Tobias Klauser
ff8cd6cb4f
unix: add UTIME_* constants on Linux
...
They might be used as special values in struct Timespec. See
http://man7.org/linux/man-pages/man2/utimensat.2.html for details.
Change-Id: I1c2d6d7731ca7f077d033e51ee6421a4f2cfbb89
Reviewed-on: https://go-review.googlesource.com/72376
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2017-10-23 17:48:59 +00:00
Tobias Klauser
43eea11bc9
unix: add MNT_* flags on FreeBSD
...
Add the MNT_* flags to be used e.g. with Getfsstat on FreeBSD.
Change-Id: I1afb50f715f447f85b4ece3d3fead8b9ce79c4f6
Reviewed-on: https://go-review.googlesource.com/70250
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
2017-10-12 16:43:49 +00:00