Sauci
bc35835339
add SockaddrCANJ1939 structure documentation
2020-11-26 06:39:54 -08:00
Sauci
551904d746
rename SockaddrJ1939 to SockaddrCANJ1939
2020-11-26 06:39:15 -08:00
Sauci
415786c5c5
fix formatting issue
2020-11-26 03:09:00 -08:00
Sauci
95f9714d84
use correct error code to handle "permission denied" error
2020-11-26 03:05:04 -08:00
Sauci
c55537cdff
handle EPERM error returned on AF_CAN
2020-11-26 02:48:38 -08:00
Sauci
cd2e4ae801
handle EAFNOSUPPORT error returned on AF_CAN
2020-11-26 01:18:49 -08:00
Sauci
23dbbe57aa
remove unnecessary for loop
2020-11-24 04:59:49 -08:00
Sauci
febc8aa386
change Getsockoptint call to be consistent with other calls of this func
2020-11-24 04:53:23 -08:00
lmbsog0
471940b943
unix: add Sockaddr implementation for J1939
...
Currently, only the raw socketcan are supported. In newer kernel versions, the sockaddr_can
structure has been extended to also support J1939 protocol, as seen in the C structure (https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/can.h#L171 ):
struct sockaddr_can {
__kernel_sa_family_t can_family;
int can_ifindex;
union {
struct { canid_t rx_id, tx_id; } tp;
struct {
__u64 name;
__u32 pgn;
__u8 addr;
} j1939;
} can_addr;
2020-11-24 04:43:57 -08:00
Tobias Klauser
f84b799fce
unix: add Pipe2 on dragonfly
...
The pipe2 syscall is available since DragonflyBSD 4.2, see
https://www.dragonflybsd.org/release42/
Change-Id: I94631fd64ee731e416049cac5f3d15544f1337dd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271177
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-11-19 10:28:17 +00:00
Matt Layher
a01c418693
unix: add Linux MPLS tunnel constants for use with rtnetlink APIs
...
Change-Id: Ic990c616c416e7bfe98e68eb74bab2810a1126ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271137
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-18 18:29:58 +00:00
Matt Layher
ade898ef86
unix: add Linux lwtunnel constants for use with rtnetlink APIs
...
Change-Id: Ibe39b315321c18916870dcfc97b083a18b91be2b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271077
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-18 18:01:33 +00:00
Tobias Klauser
c061ba923f
unix: define isBigEndian for all GOARCHes supported by gccgo
...
For golang/go#18031
For golang/go#37443
Change-Id: I49dabb362592bb61532a0c4f193919c3f2036af3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/270317
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-11-16 16:16:45 +00:00
Tamir Duberstein
0a15ea8d9b
*: use more precise build tags
...
s/!gccgo/gc/ in files which use gc-syntax assembly.
Change-Id: Iafc006cd60ad0e429cff182a05c790d80c380802
Reviewed-on: https://go-review.googlesource.com/c/sys/+/269717
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Trust: Than McIntosh <thanm@google.com >
2020-11-13 13:57:34 +00:00
Tobias Klauser
215b40eba5
unix/linux: update Dockerfile to Go 1.15.4
...
No changes in generated files.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch >
Change-Id: Ibbb81f8ef48d43d7fb620fec57c3ac779ebf0e11
Reviewed-on: https://go-review.googlesource.com/c/sys/+/268357
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-11-09 16:54:25 +00:00
Lehner Florian
da207088b7
unix: update IFLA consts on linux
...
Update the IFLA_* consts from /usr/include/linux/if_link.h
Change-Id: I8a751f9237c78737691fb425dcbc4be6e52364d9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/266977
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-01 10:28:59 +00:00
Tobias Klauser
c5abc1b1d3
unix: revert zsysnum_darwin_*.go deletion from CL 250437
...
CL 250437 removed the zsysnum_darwin_*.go files containing the SYS_*
contants for macOS. This was done assuming that users should migrate
away from direct syscalls to libSystem wrappers. Let's not force users
of this package on when they want to do that and re-add the
zsysnum_darwin_*.go files and mark the consts as deprecated.
We can still remove these once macOS actively prevents use of direct
syscalls.
Fixes golang/go#41868
Change-Id: Ie5edf135154f24e3efa4811ef2253ad1353ba132
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265857
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Bryan C. Mills <bcmills@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-28 21:52:40 +00:00
Ben Cartwright-Cox
0fcbb8f492
unix: add linux constants and types for PPS devices ioctl's
...
After trying to implement Pulse Per Second devices
in go, I found that the ioctl values and structs
where not in the unix package yet:
~# strace ppstest /dev/pps0 |& grep ioctl
ioctl(3, PPS_GETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_GETCAP, 0xbee63b84) = 0
ioctl(3, PPS_GETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_SETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
This commit should add them.
Change-Id: If1225ab7c4c38aad5d8ae841d1fdebfa45055549
GitHub-Last-Rev: c1469112b8
GitHub-Pull-Request: golang/sys#90
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265217
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-27 14:07:54 +00:00
Tobias Klauser
9d1ec526b7
unix: add anyToSockaddrGOOS on dragonfly
...
CL 264638 forgot to add func anyToSockaddrGOOS on dragonfly which breaks
the build.
Change-Id: I35d28a972c8c541dea8db0349b7e1440f5ec2fd7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265377
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-27 13:05:17 +00:00
Tobias Klauser
e1471140ff
unix: implement AF_SYSTEM/AF_SYS_CONTROL sockets on darwin
...
See https://developer.apple.com/documentation/kernel/sockaddr_ctl for
details.
AF_SYSTEM is darwin-specific, so the BSD-specific anyToSockaddr func
needs to call GOOS-specific funcs which return nil, EAFNOSUPPORT on all
BSD platforms but darwin.
For golang/go#41868
Change-Id: Id7794aba5988dd9511053b76be5efeb66c104a26
Reviewed-on: https://go-review.googlesource.com/c/sys/+/264638
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-27 09:04:13 +00:00
Tobias Klauser
119d4633e4
unix: add Ioctl{Get,Set}IfreqMTU on darwin
...
For golang/go#41868
Change-Id: I9fb8f5eee933488e4c63aaa757059b8cea4d9629
Reviewed-on: https://go-review.googlesource.com/c/sys/+/264637
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-10-26 17:38:27 +00:00
Tobias Klauser
e075d93706
unix: deflake TestPselect and TestSelect on linux
...
On some platforms (namely Linux), Select and Pselect update the
passed-in timeval/timespec, which might lead to failing tests in
case of an EINTR. Fix this by always resetting the timeval/timespec
before calling Select/Pselect.
Also change accept timeouts within 2/3 margin of the expected timeout,
like already done in TestSelect. While at it, fix the failure log to use
the common "got X, expected Y" message.
Fixes golang/go#42210
Change-Id: Id0efbbecc9c0bf44c102d5d1880b1bae32980ad1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265020
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-26 16:32:16 +00:00
Tobias Klauser
418715ba6f
unix: compare Stat_t members when checking Stat vs. Fstatat in TestFstatat
...
TestFstatat regularly fails on the dragonfly-amd64 builder due to
mismatching Stat_t info returned by the calls to Fstatat vs. Stat (most
likely due to Atime changing). Fix the test by just comparing some well
known members. This was already fixed for the Lstat call in CL 212417.
Fixes golang/go#42208
Change-Id: I3e241470d373338b9716bb9ce0265a105db2720d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265018
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-26 13:34:11 +00:00
Jason A. Donenfeld
6e5568b54d
unix,windows,plan9: add Byte{Slice,Ptr}ToString functions
...
We already provide ByteSliceFromString and BytePtrFromString, and on
Windows we provide UTF16FromString, UTF16PtrFromString, UTF16ToString,
and UTF16PtrToString. So this commit fills in the remaining two
Byte-oriented functions: ByteSliceToString and BytePtrToString. Since
the existing two are available on windows, unix, and plan9, we add the
remaining two to the same places. This helps eliminate unsafe pointer
options in addition to triggering checkptr in Go 1.15, by eliminating
the use of prior idioms for these types of casts.
Change-Id: I85ae49f2756e142c2462fe8b2428216b6992e089
Reviewed-on: https://go-review.googlesource.com/c/sys/+/263757
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Trust: Brad Fitzpatrick <bradfitz@golang.org >
Trust: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-20 23:07:47 +00:00
Tobias Klauser
eeed37f84f
unix: add IoctlCtlInfo on darwin
...
For golang/go#41868
Change-Id: I0f4dbeacfe10b9614caf05633a1de3a98a1fc85f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262959
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-18 23:04:17 +00:00
Clément Chigot
b09fb700fb
unix: add missing syscalls on AIX
...
Access, Chmod, Chown and Creat were forgotten when porting the package
on AIX.
Fixes golang/go#42001
Change-Id: I1ab8c5198240421b31db8b447fe37ce5d80e5ce8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262897
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-17 00:35:18 +00:00
Tobias Klauser
f659759dc4
unix: add support for ptrace on macOS/ARM64
...
Same as CL 260718 did for package syscall.
Updates golang/go#38485
Change-Id: I7b282b7c823dd79eb1fe8b172a78da8dfe9acd1c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262957
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Cherry Zhang <cherryyz@google.com >
2020-10-16 16:01:50 +00:00
Ian Lance Taylor
e3ed0017c2
unix/linux: update to Go 1.15.3 release
...
Does not cause any changes to generated files.
Change-Id: I635230441d4c48d1f649ca5c7cca073974e36b60
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262457
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Trust: Ian Lance Taylor <iant@golang.org >
2020-10-15 00:08:50 +00:00
Tobias Klauser
cc95f250f6
unix: add FIORDCHK on solaris/illumos
...
Change-Id: Ib789b19d45f1ca3d5628e53e68b9ab732d6f8200
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261797
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-14 08:05:44 +00:00
Tobias Klauser
9029056a59
unix: refresh types and error consts on solaris/illumos
...
Generated on SunOS 5.11
Change-Id: Ia3a00e9fa4267a748e1d8434ae8a53ffe44494be
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261461
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-14 08:05:34 +00:00
Tobias Klauser
2da7054afa
unix: remove stray TODO comment
...
This was addressed by CL 2816 for package syscall and the same comment
was deleted from asm_linux_386.s.
Same as CL 261458 for package syscall.
Change-Id: Ib5d86dbafb6766f9d8d523c6035e1f095f18e6ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261460
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2020-10-13 13:26:46 +00:00
Tobias Klauser
a5aeffabbd
unix: move build constraints comment below copyright message
...
Make fcntl_linux_32bit.go consistent with all other files in the
package.
Change-Id: If2e21027b0f31ac27d434806c18d9223ee55992f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261459
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2020-10-13 13:26:27 +00:00
Tobias Klauser
56aa3af1a1
unix: update Dockerfile to Linux 5.9 and Go 1.15.2
...
Also add some newly added IFLA_* and PERF_* consts and adjust the
renamed NFTA_LIST_UNPEC const (see torvalds/linux@da9125df85 ).
Change-Id: Ic37f39e5b5bfe063ae6d7701de05ced07e62abfb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261457
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-10-13 06:48:17 +00:00
Ian Lance Taylor
a893ed343c
unix: sync with DragonFly 5.8
...
Change-Id: I258e86b502957d76aeeead286bcc9c5e22b53834
Reviewed-on: https://go-review.googlesource.com/c/sys/+/260001
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-07 16:58:08 +00:00
Ian Lance Taylor
cec0259cc9
unix: update Darwin ztype files
...
The main effect is to change some fields of Statfs_t from arrays of int8
to arrays of byte. This makes the types of those fields correspond to the
types used on most other BSD systems.
Change-Id: If7e80fd53d6369a0f7c979c0bf36ffe530dc5d8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259903
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-07 16:57:53 +00:00
Matt Layher
ac719f4daa
unix: fix typo in PERF_TYPE_HARDWARE introduced in CL 259477
...
Change-Id: Iee2a067673309abc6b80d3cc96ac49d9d6b52865
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259799
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-06 15:56:30 +00:00
Tobias Klauser
097ba2fa90
unix: fix build on solaris after CL 259637
...
The build on illumos and solaris currently fails with:
unix/syscall_solaris.go:558:6: no new variables on left side of :=
Fix this by dropping the named return value.
Change-Id: Ie29956ba08fd107f380fe432cc85f120d66057b5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259581
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-06 15:36:26 +00:00
Matt Layher
9971236665
unix: use runtime.KeepAlive in Solaris IoctlSetTermio
...
This ensures that value remains live for the duration of the ioctl system call.
This pattern is used in all other IoctlSet* functions but appears to have been
forgotten here.
Change-Id: I2b26a5c4e7c862f779427b839327b36c1bc78c82
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259637
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-05 17:22:24 +00:00
Matt Layher
935f906f17
unix: fix typos and reflow comments on IoctlFile* functions
...
Change-Id: I9be66514d6b5c8c85e7e424c4aa7856d0f4d884d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259557
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Johan Brandhorst <johan.brandhorst@gmail.com >
2020-10-05 17:05:23 +00:00
Lehner Florian
765f4ea38d
unix: update PERF consts on linux
...
Update the PERF_* consts from /usr/include/linux/perf_event.h.
Change-Id: I2dfa09445547682fa7ed99b385476319e8493c27
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259477
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2020-10-05 06:50:44 +00:00
Matt Layher
f6757f2700
unix: add Linux watchdog structures and missing constants
...
This CL also adds the type-safe wrappers IoctlGetWatchdogInfo
and IoctlWatchdogKeepalive around the raw ioctl interface.
Change-Id: I98e3970807b28832e49524700b17b6b6f75d91ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259497
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Terin Stock <terinjokes@gmail.com >
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-04 23:06:29 +00:00
Ian Lance Taylor
fdedc70b46
unix: use package path in name of C functions
...
For onsi/ginkgo#725
Change-Id: Iff5f98cb85aabd9c675c0519c30009ed96c2f6be
Reviewed-on: https://go-review.googlesource.com/c/sys/+/258358
Trust: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
2020-09-30 18:57:26 +00:00
Tobias Klauser
e293359b92
unix: use correct cmsg alignment for netbsd/arm64
...
netbsd/arm64 requires 128-bit alignment for cmsgs.
Change-Id: I49d7a4dc223f15322c795569292b24200cedd389
Reviewed-on: https://go-review.googlesource.com/c/sys/+/258457
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
2020-09-30 18:24:49 +00:00
Tobias Klauser
4d22bbb62b
unix: remove darwin support from mksysnum.go
...
Since CL 250437 this package no longer supports non-libc, direct
syscalls on darwin. Thus support for generating zsysnum_*.go files on
darwin can be removed from the generating mksysnum.go program.
Change-Id: I8916ddcd028a60d876ad43b8ce18a1c0925ce272
Reviewed-on: https://go-review.googlesource.com/c/sys/+/258058
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-29 08:30:18 +00:00
Tobias Klauser
9d91bd6205
unix: implement Getwd using getcwd from libSystem on darwin
...
Directly wrap the getcwd implementation provided by libSystem.dylib on
darwin and use it to implement Getwd like on the BSDs. This allows to
drop the custom implementation using getAttrList and to merge the
implementation of Getwd for darwin and the BSDs in syscall_bsd.go.
Change-Id: I62d38a239a7279fb95c912344bda2830856d4da4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/257497
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-26 10:08:07 +00:00
Cherry Zhang
d9f96fdee2
all: add GOOS=ios
...
Following CL 254740, this CL does it on x/sys.
Updates golang/go#38485 .
Change-Id: I5eab09a9a87c87fc883b5701434415648fb28eb0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/255557
Trust: Cherry Zhang <cherryyz@google.com >
Run-TryBot: Cherry Zhang <cherryyz@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2020-09-23 18:26:05 +00:00
Tobias Klauser
aee5d888a8
unix: add IoctlFile{Clone,CloneRange,DedupeRange} on linux
...
Add wrappers for the FICLONE, FICLONERANGE and FIDEDUPERANGE ioctl
operations on linux. See the ioctl_ficlone(2), ioctl_ficlonerange(2) and
ioctl_fideduperange(2) man pages for details.
Change-Id: If3bad98facc362d4f7524e8d7a128815e9e2f204
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256000
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-22 07:02:32 +00:00
Tobias Klauser
e10f822d58
unix: import accept4 from libsocket.so on illumos
...
The accept4 symbol is provided in libsocket.so on illumos. Follow-up fix
for CL 254717.
Change-Id: Iad70e998ea4ab80763288a300797eae8bed7de1a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256277
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-22 07:02:05 +00:00
Tobias Klauser
cb7fb32132
unix: allow overriding GOOS using GOOS_TARGET in mksyscall.go
...
The syscall wrapper generator utility is platform independent and can in
principle be run on a GOOS other than the one we're generating the
syscall wrappers for. Allow overriding GOOS by setting GOOS_TARGET,
similar to other generator programs in the repo.
Also remove the unused GOARCH_TARGET override in the same file.
Change-Id: I91459113af9f662f12a99b99c581c7f2615cb394
Reviewed-on: https://go-review.googlesource.com/c/sys/+/256278
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-22 07:01:10 +00:00
Tobias Klauser
af09f7315a
unix: add FcntlFstore on darwin
...
This allows to perform a fcntl syscall with the F_PREALLOCATE command.
See man fcntl(2) on macOS for details.
Change-Id: I21f95b91269513064859425ab7adc42a73d6adb5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/255917
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-09-18 17:44:21 +00:00