- 09 Apr, 2016 1 commit
-
-
Alexander Neumann authored
These constants are used for fadvise() on Linux and were missing from the ztypes_linux_*.go files. Including the bluetooth headers is necessary so that cgo can resolve struct sockaddr_hci. Fixes golang/go#15114 Change-Id: I1538b5a7b9b24f910c0520d446b2fa5bd8a09013 Reviewed-on: https://go-review.googlesource.com/21753Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Apr, 2016 3 commits
-
-
Tzu-Jung Lee authored
Change-Id: Ic2eb52d4e9f7b80992707b125c11be54d7973314 Reviewed-on: https://go-review.googlesource.com/21674Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Updates golang/go#15186 Change-Id: I02403cbc9b3f1c786ee8093e1480edff891ecf13 Reviewed-on: https://go-review.googlesource.com/21676Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Tzu-Jung Lee authored
Tried to generate them with mkerrors.sh by including bluetooth/bluetooth.h, but it introduces way much more than necessary stuff. Change-Id: I380f66892f55dbe4cbfc76a0e3f9817f81d269b9 Reviewed-on: https://go-review.googlesource.com/21675 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 06 Apr, 2016 1 commit
-
-
Alex Brainman authored
If we want new secure DLL approach to be adopted, we should make conversion as simple as possible to explain and implement. I think that replacing syscall.NewLazyDLL(...) -> windows.NewLazySystemDLL(...) is easier than syscall.NewLazyDLL(...) -> &windows.LazyDLL{Name: ..., System: true} So I propose we introduce convenience function NewLazySystemDLL. $GOROOT/src/mksyscall_windows.go changes in the following CL. Change-Id: If3432aff301c347cb355e4e837834696191b2219 Reviewed-on: https://go-review.googlesource.com/21592Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 05 Apr, 2016 1 commit
-
-
Alex Brainman authored
Change-Id: I1a2b96f71c9f39a46827e9414e1058894fd2a5e1 Reviewed-on: https://go-review.googlesource.com/21523Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 02 Apr, 2016 2 commits
-
-
Brad Fitzpatrick authored
env_unset.go didn't have a the windows build tag (or filename), so it was compiling for all operating systems and as a result had weird docs at https://godoc.org/golang.org/x/sys/windows showing only Unsetenv. Updates golang/gddo#188 Change-Id: I58f2c27c3d267660c97fce5a1b28da24988c62c8 Reviewed-on: https://go-review.googlesource.com/21460Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Brad Fitzpatrick authored
Updates golang/go#14959 Change-Id: Ib91c359c3df919df0b30e584d38e56f79f3e3dc9 Reviewed-on: https://go-review.googlesource.com/21388Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 25 Mar, 2016 1 commit
-
-
Michael Matloob authored
This allows linux binaries to have bazel-style dependencies on x/sys/windows. Change-Id: I248fe62e045705f409e5d96842ed52d0764ae68f Reviewed-on: https://go-review.googlesource.com/21081Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 22 Mar, 2016 2 commits
-
-
Brad Fitzpatrick authored
It wasn't in linux/arm. Tested with: $ for x in $(go tool dist list ) ; do \ export GOOS=$(echo $x | cut -d/ -f1); \ export GOARCH=$(echo $x | cut -d/ -f2); \ echo "$GOOS; $GOARCH"; go install .; done ... which all pass, except openbsd/arm which is still broken exactly how it was broken previously. Fixes golang/go#14643 Change-Id: Ie7ae861b581b539178de26f15ba3f4bdd0e9b785 Reviewed-on: https://go-review.googlesource.com/21013Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Caio Marcelo de Oliveira Filho authored
Since Linux 3.11, O_TMPFILE flag can be used in open syscall to create an unnamed file in a directory. The file occupies space in the filesystem, and can be given a name using linkat syscall. If the file is closed without being given a name, its contents are deleted. See the manpage open(2) in Linux for details. Exports O_TMPFILE for Linux in 386 and amd64 (other architectures already had it). Exports Linkat syscall and AT_SYMLINK_FOLLOW (used for giving a name to the file) for all Linux in all architectures. Fixes golang/go#7830. Change-Id: Ib82e44f405b227e227b9cbf317c2657b32e046f5 Reviewed-on: https://go-review.googlesource.com/21003Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 15 Mar, 2016 1 commit
-
-
Riku Voipio authored
arm64 doesn't have a Dup2 syscall, instead Dup3 is supposed to be used. Since Dup3 is linux-specific, provide a wrapper to make writing portable code easier. Updates golang/go#10235 To verify it, added a testcase for Dup and Dup2. Change-Id: I066bb60d62b2bd64d7ba0fdfbb334ce2213c78e9 Reviewed-on: https://go-review.googlesource.com/20178 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 03 Mar, 2016 1 commit
-
-
Riku Voipio authored
In commit "7e44b69d x/sys/unix: fix invalid syscall on linux/arm" a test was added for time/utime syscall. This test exposed that neither time/utime work on arm64, because they call the legacy syscall "utimes". As a new architecture, arm64 doesn't implement any legacy syscalls. Implement by first calling utimensat, using UtimesNano as exampple. Change-Id: Iffed410730c06ac4c8184241d16eebf08c367524 Reviewed-on: https://go-review.googlesource.com/20174Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Feb, 2016 1 commit
-
-
Benoit Sigoure authored
This system call is used to reassociate the current thread with a Linux namespace (e.g. a network namespace or a mount namespace). This system call is key to interacting with the primitives enabling Linux containers. The users of this system call will most likely want to wrap their calls with a pair of LockOSThread / UnlockOSThread calls. Here is an example that is a reasonably close approximation of the `ns_exec' program given as an example in `man 2 setns': package main import ( "log" "os" "os/exec" "runtime" "golang.org/x/sys/unix" ) func main() { if len(os.Args) < 3 { log.Fatalf("%s /proc/PID/ns/FILE cmd args...", os.Args[0]) } fd, err := unix.Open(os.Args[1], unix.O_RDONLY, 0) if err != nil { log.Fatalf("open: %s", err) } runtime.LockOSThread() defer runtime.UnlockOSThread() if err = unix.Setns(fd, 0); err != nil { log.Fatalf("setns: %s", err) } cmd := exec.Command(os.Args[2], os.Args[3:]...) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Run() if err != nil { log.Fatalf("exec: %s", err) } } Fixes golang/go#5968. Change-Id: I78dc54667cfaef4f9e99a08d48f6e423686f1b22 Reviewed-on: https://go-review.googlesource.com/20054Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 28 Feb, 2016 2 commits
-
-
Hiroshi Ioka authored
Some system calls are obsolete and no longer available for EABI. This CL replace such system call usages. Updates golang/go#14524 Change-Id: Ib99b239455ca677e46d7097911904c45119051bd Reviewed-on: https://go-review.googlesource.com/19945 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Yao Zhang authored
Change-Id: I4bf8d5e7ebc41b5152ce181c83dc3ff94bddae57 Reviewed-on: https://go-review.googlesource.com/16994Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org>
-
- 22 Feb, 2016 1 commit
-
-
David du Colombier authored
Thanks Skip Tavakkolian. Fixes golang/go#14452. Change-Id: I0a4ef49edae61bb37f49b1071dd5c31e88ad6c04 Reviewed-on: https://go-review.googlesource.com/19729Reviewed-by: Rob Pike <r@golang.org>
-
- 04 Feb, 2016 1 commit
-
-
Matthew Dempsky authored
OpenBSD (and likely NetBSD, but it's not enabled for these tests anyway) use a different sysctl API for fetching process information than FreeBSD and its derivatives. Change-Id: Id2ab10f170b788ba4d9bd45d3347f530555da23b Reviewed-on: https://go-review.googlesource.com/19232Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 27 Jan, 2016 1 commit
-
-
Ian Lance Taylor authored
The flags parameter was added in https://golang.org/cl/7917. In that CL the reviewers discussed adding UnlinkAt and changing Unlinkat, and opted for the latter. Unfortunately, I then undid that in https://golang.org/cl/10032, which was a backport of (among others) https://golang.org/cl/5837. I didn't notice that in the syscall package 5837 removed Unlinkat with two parameters, but the port to the x/sys/unix package removed Unlinkat with three parameters. Argh. This CL effectively restores 7917, by adding the parameter back. Fixes golang/go#9923. Change-Id: I8fe218ac637d0eb0346b63b596666671374bd19f Reviewed-on: https://go-review.googlesource.com/18981Reviewed-by: Rob Pike <r@golang.org>
-
- 21 Jan, 2016 1 commit
-
-
Nick Petroni authored
Preserves SERVICE_WIN32_OWN_PROCESS as the default. Fixes golang/go#14019 Change-Id: I764016c1b5ec5e1fe88ed39b9803754af966b2f3 Reviewed-on: https://go-review.googlesource.com/18760Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
-
- 13 Jan, 2016 1 commit
-
-
Alex Brainman authored
Copy of CL 4310, 6140, 17412, 17997 and 17998. Change-Id: I7db8722a1c37f033d5ce6644859ef15c58289a46 Reviewed-on: https://go-review.googlesource.com/18552Reviewed-by: Rob Pike <r@golang.org>
-
- 11 Dec, 2015 1 commit
-
-
Ian Lance Taylor authored
Fixes golang/go#13569. Change-Id: I8af36bc81afa6b8bc0e80b3f35f0b60707bfb91b Reviewed-on: https://go-review.googlesource.com/17713Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 24 Nov, 2015 1 commit
-
-
Nick Patavalis authored
- types_linux.go: Use the kernel-defined termios structure, *not* the LIBC-defined one. The LIBC termios structure cannot be safely used to do tty-related ioctls on all architectures (e.g. ppc64, ppc64le). The kernel termios structure, and the associated macros/constants, are defined in: "asm/termbits.h" which is included by "linux/termios.h". The LIBC termios structure is defined in "bits/termios.h" which is included by "termios.h". These structures are *not* the same. For systems that have both "struct termios" and "struct termios2" use the latter to define the Termios type. This is ok, since the "struct termios2" memory layout is compatible with "struct termios" (with a couple of fields added at the end). This way, type Termios can be used with both: the "old-style" TCSETS[FW], TCGETS ioctls, *and* with the new TCSETS[FW]2, TCGETS2 ioctls. The new ioctls allow configuring arbitrary baudrates. The new Termios definitions (kernel-compatible) have the same fields as the old ones (LIBC-derived) so there should be no user-code compatibility issues. Change-Id: I3c1484c60f45b28e13404765c01616c33063afd5 Reviewed-on: https://go-review.googlesource.com/17185Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Nov, 2015 1 commit
-
-
Nick Patavalis authored
- mkerrors.sh: Included several termios-related constants that were missing. Also included definitions of tty-related ioctl numbers for linux. - zerrors_linux_*: the files have been generated using "./mkerrors.sh". After their automatic generation the files have been manually edited to remove changes that were not due to this patch. Change-Id: I0463112542a5c1c41583007003b652375f9ce572 Reviewed-on: https://go-review.googlesource.com/17184Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Oct, 2015 1 commit
-
-
Steven Hartland authored
Add support for optional sysctl arguments which is required to support sysctls that require more than the mib identifer args as returned from nametomib such as kern.proc.pid. Add SysctlUint64 which allows sysctls that return 64 bit ints to be queried. Add SysctlRaw which allows sysctls that return structs or other unsupported types to be queried. Change-Id: If0fa23935ee09496f2df210364d8988ccd0f3db6 Reviewed-on: https://go-review.googlesource.com/14955Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 09 Oct, 2015 1 commit
-
-
Matthew Dempsky authored
Same fix as golang.org/cl/15608 for package syscall. Change-Id: I8de2369220e58140596325d7ea16c015aab90d1b Reviewed-on: https://go-review.googlesource.com/15609 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 08 Oct, 2015 1 commit
-
-
Dave Cheney authored
Adds Prctl syscall for linux platforms. syscall and x/sys/unix already defined the PR_ series of constants. See discussion: https://groups.google.com/forum/#!topic/golang-nuts/rG6xShds2Dc Change-Id: Ida5562b46abef574a3f9ac31911142f1e8d7fb4f Reviewed-on: https://go-review.googlesource.com/15520Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Sep, 2015 2 commits
-
-
Steven Hartland authored
Update the generated types and errors for FreeBSD by running mkall.sh and ensuring no values where removed. Change-Id: I5b82b1896b64f1b33d569dcaa477bb88641dfa8d Reviewed-on: https://go-review.googlesource.com/15011Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Steven Hartland authored
Clang is much more common now so use the OS cc instead of forcing gcc by default. Change-Id: I1dd34c7ba56c91794ee57042dd8ac024fdd649d8 Reviewed-on: https://go-review.googlesource.com/15010Reviewed-by: Rob Pike <r@golang.org>
-
- 24 Sep, 2015 1 commit
-
-
Kim Shrier authored
The existing code has no way to manipulate termios or winsize structures on solaris. This change adds IoctlGetXXX and IoctlSetXXX functions for int, termios, termio, and winsize. The embedded awk script in mkerrors.sh has additional patterns to generate the needed ioctl constants for these calls. Fixes golang/go#12574 Change-Id: Ic62a8c698d42c8ca379c90f71e9f27635e7d03b5 Reviewed-on: https://go-review.googlesource.com/14587Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
- 17 Sep, 2015 1 commit
-
-
Shawn Walker-Salas authored
Various syscalls offered by x/sys/unix on Linux are not available on Solaris and should be, such as Mkfifo, Getwd(), Futimes() and others. In particular, all of the *at() variants of existing functions were added where appropriate. Getgroups() was fixed to use the correct value for its sanity check on the maximum number of groups. Utimesnano() was updated to use the native Solaris utimensat function for setting nanosecond-precision time. Utimes() was updated to have the same error semantics and checking as other platforms. Getgroups(), anysocktoaddr(), and Recvmsg() were fixed to check the return value before assuming syscall failure instead of relying solely on errno being set. mksyscall_solaris.pl needed some updates to better match the output of the one found in syscall. mkerrors.sh needed some updates to work out of the box on Solaris, matching those recently done to the one in syscall. The signatures (names) of some function parameters were changed to be consistent with other platforms for the sake of documentation. Fixes #8609 Change-Id: I9e4e2fee6d3ecfad9f4d845a5702ffde5166e804 Reviewed-on: https://go-review.googlesource.com/14643Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
- 10 Sep, 2015 1 commit
-
-
Shawn Walker-Salas authored
In preparation for issues such as #10180, Getpagesize() needs to be fixed to return the actual system's page size instead of assuming it's always 4096. This is particularly important for future platform support on Solaris. Fixes #12076 Change-Id: I78205165909529215fe93ed6ba56e9c3ee1c2abb Reviewed-on: https://go-review.googlesource.com/14483Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 09 Sep, 2015 1 commit
-
-
Alex Brainman authored
Allow registry blobs to be as large as 500MB Copy of CL 14287. Fixes golang/go#12493 Change-Id: I37b82fcf90ff2acef83c66016375fcae15e6eefc Reviewed-on: https://go-review.googlesource.com/14288Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 02 Sep, 2015 2 commits
-
-
Aaron Jacobs authored
These are already exposed on Linux. I believe they were left out of darwin because fchmodat didn't exist on older versions of XNU. Change-Id: I166f2b23270937c1b6cc3bd73e7f7b72d2d488e9 Reviewed-on: https://go-review.googlesource.com/14092Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Aaron Jacobs authored
This makes the script resistant to changes in the SDK location, which apparently happens from time to time. While I was at it, made another cosmetic touch-up: use a .gitignore file to stop `git status` from showing the _obj/ directory generated by mkall.sh. Change-Id: Ia706114d94e324ab443f6f5d6aa7c0c9f8a84620 Reviewed-on: https://go-review.googlesource.com/14192Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 01 Sep, 2015 2 commits
-
-
Aaron Jacobs authored
I did this on OS X 10.10.5 (14F27) using the OS X 10.10 SDK included in Xcode 6.4 (6E35b) for syscall numbers. I believe this SDK is intended for 64-bit Macs, but the syscall numbers aren't likely to vary. See also the discussion in this thread: https://groups.google.com/d/topic/golang-dev/738LXeykFsM/discussion This commit contains the same SYS_SYSCTL -> SYS___SYSCTL workaround found in commit 9ef4b6c1; see its description for more info. Change-Id: I952ae56032033b49f8910281c68dcc72abb2d106 Reviewed-on: https://go-review.googlesource.com/14151Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Aaron Jacobs authored
I did this on OS X 10.10.5 (14F27) using the iOS SDK included in Xcode 6.4 (6E35b). This commit contains the same SYS_SYSCTL -> SYS___SYSCTL workaround found in commit 9ef4b6c1; see its description for more info. Change-Id: I4dddc2a6d030ce297ee711f4430ec9db3abcda50 Reviewed-on: https://go-review.googlesource.com/14094Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
- 31 Aug, 2015 2 commits
-
-
Aaron Jacobs authored
In commit e3fe6f5d I manually renamed SYS_SYSCTL to SYS___SYSCTL so that syscall_bsd.go would continue to build, despite a rename of __sysctl to sysctl somewhere between these two XNU versions: http://www.opensource.apple.com/source/xnu/xnu-2422.90.20/bsd/kern/syscalls.master http://www.opensource.apple.com/source/xnu/xnu-2782.1.97/bsd/kern/syscalls.master In this commit I add a workaround that doesn't require manual edits to autogenerated output, so regenerating the output should now cause no diffs. Change-Id: I0286484e7efcf9762ce39e5dcc7a8366e3798a77 Reviewed-on: https://go-review.googlesource.com/14091Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Aaron Jacobs authored
I did this on OS X 10.10.5 (14F27) using the 10.10 SDK included in Xcode 6.4 (6E35b). This required removing a C include from mkerrors.sh, since it doesn't exist on either of my two systems. I spot checked the syscall number changes against this definitive list, which is for approximately my kernel version: http://www.opensource.apple.com/source/xnu/xnu-2782.20.48/bsd/kern/syscalls.master Everything I examined checked out, including the removed syscalls being marked as "old" or being described in comments as no longer existing. There is one exception to the output being cleanly autogenerated: I have manually renamed SYS_SYSCTL back to SYS___SYSCTL, the name used previously and still used by syscall_bsd.go. Because it would distract from this CL, I will fix this in an upcoming CL. Change-Id: I0168f608cab714aa5981b3e7d08d8fd84888d0d5 Reviewed-on: https://go-review.googlesource.com/14006Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 30 Aug, 2015 1 commit
-
-
Daniel Johansson authored
This CL includes changes from: https://golang.org/cl/13929 https://golang.org/cl/13854 Part of fixing https://golang.org/issue/12015 Change-Id: I62e00e165d97d2349c89a783aed7fcbe9e0abd34 Reviewed-on: https://go-review.googlesource.com/14016 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-