summaryrefslogtreecommitdiff
path: root/src/sys
AgeCommit message (Collapse)Author
2017-12-05Remove nix-test subcrateBryant Mairs
This was doing testing for errno constants and a few other types that is no longer necessary now that these types are all tested within the libc project itself.
2017-12-05Merge #696bors[bot]
696: Stop reexporting `Errno` variants r=Susurrus a=jonas-schievink Closes #664 (unsure if this is everything needed)
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-12-03Add support for getifaddrs. Closes: #650.Markus Wanner
2017-12-02Upgrade to Bitflags 1.0Bryant Mairs
The libc_bitflags! macro was replaced with a non-recursive one supporting only public structs. I could not figure out how to make the old macro work with the upgrade, so I reworked part of the bitflags! macro directly to suit our needs, much as the original recursive macro was made. There are no uses of this macro for non-public structs, so this is not a problem for internal code.
2017-12-01Fix UB in epoll_ctlBryant Mairs
When passing None as an argument to `epoll_ctl`, UB is elicited within the `Into<&EpollEvent>` impl because it passes a null pointer as a `&mut EpollEvent`. Instead we remove that implementation completely and handle this case directly within the `epoll_ctl` function. Thanks to Arnavion for helping to debug this.
2017-11-19sys/socket: add UnixAddr abstract name getterLuca Bruno
This introduces an `as_abstract()` getter to `UnixAddr` in order to retrieve the name of an abstract unix socket. This also adds tests around abstract addresses and clarify docs, adding explicit semantics.
2017-11-16Remove bitrig #[cfgsBryant Mairs
Bitrig is in the process of re-merging with OpenBSD as is no longer actively developed. Additionally it was never tested, and probably was quite broken, for nix. So let's remove all references and not even pretend to support it.
2017-11-11Merge #568bors[bot]
568: Add process_vm_readv and process_vm_writev r=asomers a=geofft
2017-11-11Merge #787bors[bot]
787: Omit invalid waitpid flags on OpenBSD r=Susurrus a=worr OpenBSD doesn't have `WEXITED`, `WSTOPPED`, or `WNOWAIT`, so omit those from that platform.
2017-11-11Formatting with rustfmtWilliam Orr
2017-11-11Omit invalid waitpid flags on OpenBSDWilliam Orr
OpenBSD doesn't have `WEXITED`, `WSTOPPED`, or `WNOWAIT`, so omit those from that platform.
2017-11-11Merge #792bors[bot]
792: Use libc_enum! where possible r=Susurrus a=wginolas Some enums which use different names for values than libc still set the discriminators manually. closes #254
2017-11-11Alphabetize some target_os configurationsWolfgang Ginolas
2017-11-08Add process_vm_readv and process_vm_writevGeoffrey Thomas
2017-11-08Merge #771bors[bot]
771: ptrace: add PTRACE_O_EXITKILL option r=Susurrus a=bpowers It is a somewhat newer option -- it requires Linux 3.8. Is there a more precise way to specify that?
2017-11-07Merge #794bors[bot]
794: Migrate memfd constants to libc r=Susurrus a=Susurrus This will fail because rust-lang/libc#836 is not merged yet, but just getting it staged for when it is.
2017-11-05Migrate memfd constants to libcBryant Mairs
2017-11-05Use libc_enum! where possibleWolfgang Ginolas
Some enums which use different names for values than libc still set the discriminators manually. closes #254
2017-11-05Fix kevent for netbsd filter datatypeBryant Mairs
The datatype for kevent.filter is u32 on NetBSD and i16 on all other supported platforms. This was recently fixed in upstream libc, breaking this API, so this fixes it. This change also modernizes the code a bit to unify the EventFilter datatype across platforms and switch to the libc_enum! macro.
2017-11-05Sort target OSes alphabeticallyBryant Mairs
2017-10-30ptrace: add PTRACE_O_EXITKILL optionBobby Powers
It is a somewhat newer option -- it requires Linux 3.8.
2017-10-11Merge #778bors[bot]
778: Replace most Linux man page links with Open Group man page links r=posborne a=asomers But leave in place Linux links for non-standard functions. Also, add brief docs for some functions that were lacking them.
2017-10-08Replace most Linux man page links with Open Group man page linksAlan Somers
But leave in place Linux links for non-standard functions. Also, add brief docs for some functions that were lacking them.
2017-10-02Add more accessors for AioCbAlan Somers
2017-09-04Add support for SO_TIMESTAMPWesley Wolfe
2017-09-03Fixed error handling in `AioCb::{fsync,read,write}`Alan Somers
Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes #714
2017-09-03AioCb::Drop will now panic for in-progress AioCbAlan Somers
Printing a warning message to stderr isn't really appropriate, because there's no way to guarantee that stderr is even valid. Nor is aio_suspend necessarily an appropriate action to take.
2017-09-03Merge #746bors[bot]
746: Replace socket FFI with libc versions r=asomers a=Susurrus Getting this up there to get some CI run on it. Replacing the `msghdr`, `cmsghdr`, and other FFI function declarations will be a little more involved so I wanted to run this through first.
2017-09-01Merge #750bors[bot]
750: Migrate quota module to libc FFI types r=asomers a=Susurrus
2017-08-29Migrate quota module to libc FFI typesBryant Mairs
2017-08-28Merge #749bors[bot]
749: Moved ptrace constants into enum types plus minor additions r=Susurrus a=xd009642 Reopening of #734 hence the branch name, changelog will be updated once the pr number of this new pull request is known.
2017-08-28Added detach functionxd009642
2017-08-28Moved ptrace constants into enum types added minor functionality.xd009642
Used the libc_enum! macro to create enums for the ptrace event, request, and libc_bitflags for options constants defined in libc. Also, replicated functionality to move from c_int to PtraceEvent enum in PR #728 as it appears to be abandoned. Added utility function for detaching from tracee. Updated names and removed ptrace::ptrace namespace
2017-08-27Remove syscall module.Bryant Mairs
This module merely contained FFI declarations, and only enough to implement memfd_create() and pivot_root() wrapper functions in nix. Since these declarations are redundant with equivalent FFI declarations in libc, we'll remove them here. In the future, any syscall-related wrapper function will be implemented directly and utilize libc for FFI declarations as we cannot generically expose a type-safe `syscall()` because of its variadic argument list.
2017-08-26Replace more FFI instancesBryant Mairs
2017-08-25Merge #732bors[bot]
732: Use libc definitions for wait module r=Susurrus a=Susurrus Not certain if these are all correct yet, but we can reuse a ton of logic from `libc` within the `wait` module.
2017-08-21Use libc definitions for wait moduleBryant Mairs
2017-08-21Expose signalfd on AndroidBryant Mairs
2017-08-21Log sendfile as missing for some BSDsBryant Mairs
2017-08-21Expose utsname on all platformsBryant Mairs
2017-08-17Merge #725bors[bot]
725: Match syntax of libc_bitflags! with bitflags! r=asomers Also update a couple of constant declarations while we're at it.
2017-08-17Merge #700bors[bot]
700: Get rid of a lot of transmutes r=asomers Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-16Replace ffi constants with libc in epollBryant Mairs
2017-08-16Replace ffi declarations for selectBryant Mairs
2017-08-16Use libc::uname and libc::utsnameBryant Mairs
2017-08-16Use libc::quotactlBryant Mairs
2017-08-16Use libc_bitflags for stat::ModeBryant Mairs
2017-08-16Match libc_bitflags! syntax to upstream bitflags!Bryant Mairs
2017-08-16Replace extra SOCK_ constants with libc versionsBryant Mairs
Fixes #244