- 28 Jul, 2017 3 commits
-
-
Tobias Klauser authored
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/51570Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matt Layher authored
The packet_mreq structure is used on Linux to modify the behavior of packet sockets using setsockopt. See 'man 7 packet' for more details. Change-Id: I34e5b99a6b6eb1f23d49a9c9f25ce7b77121c8f0 Reviewed-on: https://go-review.googlesource.com/51710 Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Add the SizeofIovec constant corresponding to type Iovec. Change-Id: Icde241b8cac3bc89806f0081a4021598bf0ef7cf Reviewed-on: https://go-review.googlesource.com/51730Reviewed-by: Matt Layher <mdlayher@gmail.com> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Jul, 2017 1 commit
-
-
Kirill Smelkov authored
Syncfs is Linux-specific system call to synchronize to disk one filesystem specified by fd to any of its files. See http://man7.org/linux/man-pages/man2/syncfs.2.html for details. Change-Id: Ia2ad6208c3fa0e9c40d5112ce938edd5d374131d Reviewed-on: https://go-review.googlesource.com/51510Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Jul, 2017 1 commit
-
-
Brad Fitzpatrick authored
It was broken by https://golang.org/cl/47290 Fixes golang/go#21136 Change-Id: I2a08869fd44a9776f0dc7d461814e1df4e606b5d Reviewed-on: https://go-review.googlesource.com/51270Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 25 Jul, 2017 4 commits
-
-
Tobias Klauser authored
Remove a duplicate build tag in unix/flock.go. Keep the alphabetically sorted version below the copyright header. Change-Id: Ie3a6e5e01e5e4114960fdf63111a68d3b2b8de47 Reviewed-on: https://go-review.googlesource.com/51051Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
Add Major, Minor and Mkdev functions for converting devices numbers to their major/minor components and vice versa. The functions follow the behavior of glibc's corresponding macros. Also add an explanatory comment about the device number format, so the magic numbers make more sense. Test the conversion macros with some well-known device numbers for devices which should be present on any Linux system. Fixes golang/go#8106 Change-Id: Id336317985d6ac85ee83bc54e5f23703257c9121 Reviewed-on: https://go-review.googlesource.com/50550 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Add the Msync function on darwin/amd64 and darwin/386. Fixes golang/go#8245 Change-Id: I1d234bb97731934c36d926ed2332c93b35b2f641 Reviewed-on: https://go-review.googlesource.com/50892Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tobias Klauser authored
Add the Msync function on Linux. See http://man7.org/linux/man-pages/man2/msync.2.html Updates golang/go#8245 Change-Id: I964259bafc8d4fbca09961443f21c4278bf56706 Reviewed-on: https://go-review.googlesource.com/50891Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add the Faccessat, Fchownat, Linkat, Mkdirat, Openat, Readlinkat, Renameat, Symlinkat and Unlinkat functions (to conform to POSIX.1-2008) and make Fchmodat available on all architectures, not just amd64. Also add the missing AT_* constants. Generated on Mac OS 10.11 (Darwin 15.6.0) for darwin/amd64 and darwin/386 only. Fixes golang/go#14458 Change-Id: I6d9258864383ea77f9cad058ee8ba2c728213b40 Reviewed-on: https://go-review.googlesource.com/50450Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 19 Jul, 2017 1 commit
-
-
Ben Laurie authored
Change-Id: Ibb1426ebd18d27ee9f144af0fd8c94b08c06f7d7 Reviewed-on: https://go-review.googlesource.com/47290Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 18 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add IoctlGetWinsize and IoctlSetWinsize to retreive and manipulate Winsize structures on Linux, akin to the already existing implementation on Solaris. Also remove the named result parameter for IoctlSetInt and IoctlSetTermios, as they add no additional use. Change-Id: Id349d1d6a21d5c9a05943f4dcc3a275613ccf7b8 Reviewed-on: https://go-review.googlesource.com/49231 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 14 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add the Mkfifoat function on Linux, akin to the existing Mkfifo function but taking an additional dirfd parameter. See http://man7.org/linux/man-pages/man3/mkfifo.3.html Originally requested in golang/go#14216 Also remove the named result parameter for Mkfifo, as they add no additional use (suggested by Brad Fitzpatrick). Change-Id: I7b759752abf3e1469d7f883a7f13313e3062aeb4 Reviewed-on: https://go-review.googlesource.com/48530Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add additional SIOC* socket ioctl constants from linux/sockios.h on Linux. Change-Id: I76f8c9d9d0015d398ee52844b3c9f506cd182329 Reviewed-on: https://go-review.googlesource.com/47950Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Jul, 2017 1 commit
-
-
Tobias Klauser authored
Add the PERF_EVENT_IOC_* constants on Linux which are used to enable/disable/configure perf events. Also add the PERF_IOC_FLAG_GROUP constant which might be using as part of the ioct argument. See section "perf_event ioctl calls" in http://man7.org/linux/man-pages/man2/perf_event_open.2.html Change-Id: I92fb8f6ef5cc53711f00db566d8e277cdf1cd607 Reviewed-on: https://go-review.googlesource.com/47770Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Jul, 2017 1 commit
-
-
Francesc Campoy authored
Change-Id: I5709137db7308934e627d866da1cc8aa5abca7db Reviewed-on: https://go-review.googlesource.com/47310Reviewed-by: Rob Pike <r@golang.org>
-
- 03 Jul, 2017 1 commit
-
-
Awn authored
Change-Id: I5bb10469bab144f5e42c7bcf6ee8717d3fd0d4e4 Reviewed-on: https://go-review.googlesource.com/47337Reviewed-by: Matt Layher <mdlayher@gmail.com> Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Jul, 2017 2 commits
-
-
Awn authored
Change-Id: I0dee287567bdbf882e804bcd5ed7dcd6f748b30c Reviewed-on: https://go-review.googlesource.com/47340Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Awn authored
Fixes golang/go#20086 Change-Id: Ifdc2561fe6cc125fa45a57bad9750f3f3f055e66 Reviewed-on: https://go-review.googlesource.com/47335 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 30 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Add IoctlGetTermios and IoctlGetTermios to retreive and manipulate Termios structures on Linux, akin to the already existing implementation or Solaris. If desired, functions conforming to POSIX tcgetattr/tcsetattr could be implemented on top of these. Change-Id: I2a71061bad2e632c597b6f6184ad6374c46a43ee Reviewed-on: https://go-review.googlesource.com/47330Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Jun, 2017 2 commits
-
-
Tobias Klauser authored
Add the UMOUNT_NOFOLLOW on Linux, available since Linux 2.6.34. See http://man7.org/linux/man-pages/man2/umount.2.html and https://github.com/torvalds/linux/commit/db1f05bb85d796 Fixes golang/go#18316 Change-Id: I5c7dafdbb311f287b6cf290aa8a0eaf2940b9834 Reviewed-on: https://go-review.googlesource.com/46771Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tyler Treat authored
Add the remaining AcceptX commands (AcceptParamChange, AcceptNetBindChange, AcceptHardwareProfileChange, AcceptPowerEvent, and AcceptSessionChange) to the windows/svc package. Also add support for these to updateStatus such that a service can actually accept these commands. Change-Id: I11191e7798489b3222a3e76ba55129f10fd202ab Reviewed-on: https://go-review.googlesource.com/46722Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Jun, 2017 2 commits
-
-
Tobias Klauser authored
Add the SECCOMP_MODE_DISABLED, SECCOMP_MODE_STRICT and SECCOMP_MODE_FILTER constants to be used with the PR_SET_SECCOMP prctl. See http://man7.org/linux/man-pages/man2/prctl.2.html Change-Id: Iacd1ffaeced4ae95e780a09038d35b763778a3d3 Reviewed-on: https://go-review.googlesource.com/46691Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Tobias Klauser authored
Add the XATTR_CREATE and XATTR_REPLACE constants, to be used in the flags parameter of Setxattr/Lsetxattr. See http://man7.org/linux/man-pages/man2/setxattr.2.html Fixes golang/go#14454 Change-Id: I868ac019fe3be755e0f6f8bff734f843ba602ee9 Reviewed-on: https://go-review.googlesource.com/46690Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 23 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Currently Linux' fchmodat(2) syscall implementation doesn't support the flags parameter (though it might in future versions [1]). Fchmodat in x/sys/unix takes the parameter and (wrongly) passes it on to the syscall which will ignore it. According to the POSIX.1-2008 manual page [2], AT_SYMLINK_NOFOLLOW is the only valid value for the flags parameter and EOPNOTSUPP should be returned in case changing the mode of a symbolic link is not supported by the underlying system. EINVAL should be returned for any other value of the flags parameter. [1] https://patchwork.kernel.org/patch/9596301/ [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html Change the Fchmodat implementation accordingly and also add the corresponding test. Fixes golang/go#20130 Change-Id: I62e677e6674d3702eaf388af0ac3d7e623a35c24 Reviewed-on: https://go-review.googlesource.com/46474Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 15 Jun, 2017 1 commit
-
-
Alex Brainman authored
Add API to list services installed on the system. Fixes golang/go#20596 Change-Id: Ifa2f20ef15ccb962bd21d03788ce931dd45f2630 Reviewed-on: https://go-review.googlesource.com/45711Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Add support for the eventfd2 syscall on Linux. Use the eventfd2 syscall instead of eventfd, as the latter does not provide a flags argument and glibc also maps its eventfd() function to the eventfd2 syscall, see the Notes section in http://man7.org/linux/man-pages/man2/eventfd.2.html Also add the corresponding flags values EFD_CLOEXEC, EFD_NONBLOCK and EFD_SEMAPHORE. Change-Id: Ia8c99e68d5966ab5c7ebe7e45423943fd7d8214e Reviewed-on: https://go-review.googlesource.com/45093Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Jun, 2017 1 commit
-
-
Tobias Klauser authored
Add the following additional Getrlimit/Setrlimit resource constants (see http://man7.org/linux/man-pages/man2/getrlimit.2.html): RLIMIT_LOCKS RLIMIT_MEMLOCK RLIMIT_MSGQUEUE RLIMIT_NICE RLIMIT_NPROC RLIMIT_RSS RLIMIT_RTPRIO RLIMIT_RTTIME RLIMIT_SIGPENDING Fixes golang/go#14854 Change-Id: I302ff67d6d1b11d94f18614490fbd634a8caec19 Reviewed-on: https://go-review.googlesource.com/45052Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 29 May, 2017 1 commit
-
-
Tobias Klauser authored
Add support for the lgetxattr, llistxattr, lremovexattr and lsetxattr on Linux, akin to the already existing getxattr, listxattr, removexattr and setxattr syscalls. These variants are identical to the already existing variants. except in the case of a symbolic link where the extended attribute operation is applied to the link itself rather than to the file that it refers to. See: http://man7.org/linux/man-pages/man2/getxattr.2.html http://man7.org/linux/man-pages/man2/listxattr.2.html http://man7.org/linux/man-pages/man2/removexattr.2.html http://man7.org/linux/man-pages/man2/setxattr.2.html Fixes golang/go#14116 Change-Id: I786953db8bf862566f54bdd745cc1feca5031be7 Reviewed-on: https://go-review.googlesource.com/44374Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 May, 2017 1 commit
-
-
Matt Layher authored
This CL adds basic integer get/set functions which wrap a generic ioctl call. The API is similar the one introduced for solaris/amd64 in CL 14587, but the request parameter has been changed to a uint instead of an int. This makes requests with a number larger than the maximum signed 32-bit integer work on linux/386. For consistency, the solaris/amd64 API has also been updated to make use of a uint instead of an int for the request number. Fixes golang/go#20474 Change-Id: Iaae1ee2e4bb4bfcc420dcec252fe53c8d90ce81d Reviewed-on: https://go-review.googlesource.com/44009 Run-TryBot: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 May, 2017 1 commit
-
-
helloPiers authored
The args passed to Mgr.CreateService end up as the command-line arguments (available via os.Args), not as the args passed to Svc.Handler.Execute. Fixes golang/go#20440 Change-Id: I55a1ec3432b377082c018fe960114c96350e8978 Reviewed-on: https://go-review.googlesource.com/43714Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 18 May, 2017 2 commits
-
-
Joe Richey joerichey@google.com authored
This CL adds support for the ADD_KEY, REQUESET_KEY, and KEYCTL syscalls. These syscalls allow access to the kernel keyring facilities. In C code, these syscalls are wrapped by the libkeyutils package. See: http://man7.org/linux/man-pages/man7/keyutils.7.html The ADD_KEY and REQUEST_KEY calls are fairly straightforward, but the KEYCTL syscall is a multiplexor for a number of key management functions. See: http://man7.org/linux/man-pages/man3/keyctl.3.html The Go bindings for the KEYCTL functions attempt to replicate what libkeyutils does. This is done via generated helper functions. Change-Id: If8c97d4ef5bce14c43dee3e6772ded42dc3c595a Reviewed-on: https://go-review.googlesource.com/41415Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Julian Pastarmov authored
This allows services written with this library to register for more advanced notifications like SERVICE_CONTROL_DEVICEEVENT for example. Also the code now exposes the service status handle through a new api call, because the handle is needed to register for such notifications and can not be obtained by any other means. Change-Id: I80796e1dd9d94ec9d6c236d0413b17288c67fe1f Reviewed-on: https://go-review.googlesource.com/42812Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 17 May, 2017 1 commit
-
-
Mikio Hara authored
Change-Id: I4ef179aacaf0694cd7661b4d9972ce85abeee8df Reviewed-on: https://go-review.googlesource.com/43470Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 May, 2017 1 commit
-
-
Sean Chittenden authored
Reference: https://www.illumos.org/man/2/statvfs Change-Id: If7af43da35b3204f5069a48eb08426a145544008 Reviewed-on: https://go-review.googlesource.com/43490Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 May, 2017 4 commits
-
-
Derek McGowan authored
Introduces the CopyFileRange syscall which first appears in Linux 4.5. Allows copying file content between file descriptors within the kernel without transferring data to user space. This syscall also allows the kernel to take advantage of reflinking or other fast copy methods on supported file systems. http://man7.org/linux/man-pages/man2/copy_file_range.2.html Change-Id: Id365f1e5d4d5ddf7159478e3a13084c9576ebd5c Reviewed-on: https://go-review.googlesource.com/39992Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
James Cowgill authored
On mips, "struct user" bears no relation to the actual structure used by PTRACE_GETREGS. The real structure is "struct pt_regs" which is declared in asm/ptrace.h Fixes golang/go#20338. Change-Id: I604d27bd2b0a0903784380cbd3fa2fd9b9811fa5 Reviewed-on: https://go-review.googlesource.com/43431Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
James Cowgill authored
After this commit the testsuite passes on mips64le. Fixes golang/go#20340. Change-Id: I6b3f673674af107fd6d249ccf5e695e0e50a41bb Reviewed-on: https://go-review.googlesource.com/43430Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Tamir Duberstein authored
Useful since GetSystemTimePreciseAsFileTime is Windows 8+. Change-Id: I736bd0668aaf6ad086f6465b8b9a17f1943f0570 Reviewed-on: https://go-review.googlesource.com/43312Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 11 May, 2017 1 commit
-
-
Mikio Hara authored
This is a backport of https://go-review.googlesource.com/30171. Updates golang/go#7402. Change-Id: I4e79570964c248ec52acf14d0ed8306e52073a51 Reviewed-on: https://go-review.googlesource.com/43212 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-