summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-07-19Unify argument names to generated ioctl functionsBryant Mairs
2017-07-19Remove unnecessary constantsBryant Mairs
2017-07-19Remove c_int and c_void from rootBryant Mairs
These were exported for some weird reason and then left in for documentation. Also some parts of certain modules used them and others used the libc:: prefix. This was removed to improve the docs and also code consistency
2017-07-19Use the proper ioctl number type depending on targetBryant Mairs
This also means that we need to properly mask off bits to the valid range of ioctl numbers.
2017-07-19Remove ioc_* functionsBryant Mairs
These are low-level functions that shouldn't be exposed
2017-07-19Revise ioctl module documentationBryant Mairs
This refactors the examples to more directly address the exact use cases for the `ioctl!` macro that `nix` provides. Additionally other macros that should not be used by end users are no longer discussed.
2017-07-19Remove unnecessary path aliasingBryant Mairs
2017-07-19Hide internal macros/types within ioctlBryant Mairs
2017-07-19Add a "bad none" variant to the ioctl macroBryant Mairs
2017-07-19Re-add bad variant of ioctl!Bryant Mairs
2017-07-19Remove old workaroundBryant Mairs
2017-07-19Merge #681bors[bot]
681: Remove feature flags r=Susurrus These are vestiges of the initial push to get this working on Rust 1.0. These feature flags are undocumented and so hard to discover (only learned about them today!), prevent functions being included that should be and this also affects documentation on docs.rs, and none of the features are tested in CI and the `execvpe` has been broken for forever. The solution is to conditionally compile everything supported for a given platform and do away completely with the feature flags. The `execvpe` function is completely removed as it's not available for *nix platforms in libc and is already broken, so no loss removing it. We'll add it back once it's back in libc (rust-lang/libc#670). Closes #98. Closes #206. Closes #306. Closes #308.
2017-07-19Merge #686bors[bot]
686: Fix special ptraces r=Susurrus In #614 we added specializations of `ptrace()` that added more type safety. As part of this, the `UnsupportedOperation` error was introduced for the requests that are covered by specialized versions so they couldn't be used with the general `ptrace()`. Unfortunately, no tests were added with this PR and so it slipped through that you could not do those operations at all anymore: `ptrace()` reported `UnsupportedOperation` for them and `ptrace_*` called `ptrace`, not `ffi::ptrace` and so also reported `UnsupportedOperation`! Whoops! This minimally-invasive surgery corrects this by adding tests that call all the specialized `ptrace_*` ignoring the return value save checking for `UnsupportedOperation`. It also changes the functions calls to use `ffi::ptrace()` directly to fix the bug. As this was never a bug in a released version of `nix`, there's no need for a changelog entry here.
2017-07-18Remove broken execvpe implementationBryant Mairs
It was broken when enabled, and currently the libc definition is only available for windows. This will be re-added when a new libc is released that supports it across all available platforms
2017-07-18Remove signalfd feature in favor of conditional compilationBryant Mairs
Note that this is now only available for Linux as support is missing in libc for Android (see rust-lang/libc#671). As part of this work the SIGUSR2 signal mutex was altered to be a general signal mutex. This is because all signal handling is shared across all threads in the Rust test harness, so if you alter one signal, depending on whether it's additive or may overwrite the mask for other signals, it could break the other ones. Instead of putting this on the user, just broaden the scope of the mutex so that any altering of signal handling needs to use it.
2017-07-17Remove preadv_pwritev feature in favor of conditional includeBryant Mairs
2017-07-17Remove eventfd feature in favor of conditional includeBryant Mairs
2017-07-17Improve OpenptyResult documentationAlan Somers
2017-07-17Refactor ptrace_get_dataBryant Mairs
The boxing and unboxing was unnecessary and instead the references to the type on the stack can just be cast.
2017-07-17Fix UnsupportedOperation when using ptrace_* functionsBryant Mairs
2017-07-16Merge #677bors[bot]
677: PtyMaster::drop should panic on EBADF r=asomers Fixes #659
2017-07-15PtyMaster::drop should panic on EBADFAlan Somers
Also, document the double-close risk with unistd::close Fixes #659
2017-07-15Merge #630bors[bot]
630: Add wrappers for sysconf(3), pathconf(2), and fpathconf(2) r=asomers
2017-07-15Add sysconf(3), pathconf(2), and fpathconf(2)Alan Somers
2017-07-10Enable termios on iOS and move it to Tier 2Bryant Mairs
2017-07-10Add tcgetsid()Bryant Mairs
2017-07-10Add cfmakeraw and cfsetspeedBryant Mairs
2017-07-10Use libc types for termiosBryant Mairs
This also removes the incorrect TCSASOFT definition as an enum type because it's actually a bitfield.
2017-07-10Add a libc_enum! macroBryant Mairs
This reduces the boilerplate necessary when wrapping libc constants into groups via enums
2017-07-10Fix sendmsg on macOS when passing a zero entry cmsgs array.Matthew Gregan
2017-07-10Simplify Vec allocation in sendmsg after 077d979a removed alignment hacks.Matthew Gregan
2017-07-09Merge #624bors[bot]
624: Enable ptrace on all Linux platforms r=Susurrus Nothing that nix currently binds is architecture-specific, and Android supports ptrace just as much as non-Android Linux.
2017-07-08Support syscalls on mips64Bryant Mairs
2017-07-08Enable syscalls on s390xBryant Mairs
2017-07-08SIGSTKFLT doesn't exist on Linux/GNU/mips(64)Bryant Mairs
2017-07-08Enable ioctl on mips64 and s390xBryant Mairs
2017-07-08Enable ptrace on all Linux platformsGeoffrey Thomas
Nothing that nix currently binds is architecture-specific, and Android supports ptrace just as much as non-Android Linux.
2017-07-07sys/statfs: use statfs from libcJörg Thalheim
the previous definition were linux specific.
2017-07-07reuse mknod/umask/fstat/lstat from libcJörg Thalheim
2017-07-05We need to pass by value and not by pointer for writing ioctlsBastian Köcher
2017-07-05Merge #625bors[bot]
625: Use libc_bitflags! for BSD in fcntl.rs r=Susurrus
2017-07-05Wrap lines to keep them under 100 charsequal-l2
2017-07-05Unify BSD constsequal-l2
2017-07-05Fix libc is not viable with netbsdequal-l2
2017-07-04Allow nix to compile on android targetsroblabla
2017-07-04Allow casting a flag to a type in libc_bitflags!roblabla
This is necessary because certain flags in libc have different types, generally due to a mistake when adding the flags to the libc. See https://github.com/rust-lang/libc/pull/511 for an example of such a discrepency.
2017-07-04Merge pull request #629 from Kixunil/newtypesAlan Somers
Newtypes for uid_t, gid_t and pid_t.
2017-07-04Use libc_bitflags! for BSD in fcntl.rsequal-l2
2017-07-02Rely on libc for more socket constantsBryant Mairs
2017-07-02Newtypes for uid_t, gid_t and pid_t.Martin Habovštiak