summaryrefslogtreecommitdiff
path: root/src/sys
AgeCommit message (Collapse)Author
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-04Allow nix to compile on android targetsroblabla
2017-07-04Merge pull request #629 from Kixunil/newtypesAlan Somers
Newtypes for uid_t, gid_t and pid_t.
2017-07-02Rely on libc for more socket constantsBryant Mairs
2017-07-02Newtypes for uid_t, gid_t and pid_t.Martin Habovštiak
2017-06-20Merge #599bors[bot]
599: Support powerpc64 r=Susurrus The test_ioctl values are computed using ioctl-test.c
2017-06-19Support powerpc64Luca Barbato
The test_ioctl values are computed using ioctl-test.c
2017-06-18Fix BSD errorequal-l2
2017-06-18Update bitflags to 0.9equal-l2
2017-06-13Added ptrace utilities.Daniel McKenna
Some ptrace functions return structures through the data argument. This commit adds utilities to return data through this mechanism and function specialisations for a few of these functions (getting event messages or the siginfo_t struct). Once the next version of libc is released these utilities will be expanded to include the fpregs and user_regs structs. Ptrace requests that are now satisfied by a more specific public function will return an unsupported operation error. This has involved adding an UnsupportedOperation to the nix::Error enum and removed the mapping from Error to Errno and from Error to std::io::Error.
2017-06-04Add pthread_selfking6cong
2017-06-01Add SigAction gettersHenning Ottesen
* SigAction::flags() * SigAction::mask() * SigAction::handler()
2017-04-21remove test warningsking6cong
2017-04-16Self should not be mutated (pull request 564)diekmann
2017-04-15Add AioCb::from_boxed_sliceAlan Somers
The existing AioCb constructors work for simple programs where everything is stored on the stack. But in more complicated programs the borrow checker can't prove that a buffer will outlive the AioCb that references it. Fix this problem by introducting AioCb::from_boxed_slice, which takes a reference-counted buffer. Fixes #575
2017-04-09Split socket consts. test across ARM arch.Zac Berkowitz
2017-04-09Removed tests on ARM for non-existant constants.Zac Berkowitz
2017-04-09Removed unused libc imports in termios.Zac Berkowitz
2017-04-09Added missing syscalls for powerpcZac Berkowitz
2017-04-09Removed some socket constants from arch=armZac Berkowitz
2017-04-09Fixed constants for MIPSZac Berkowitz
2017-04-09Fixes nix-rust/nix#532Zac Berkowitz
2017-04-09Switched bsd speed_t def. to libc::speed_tZac Berkowitz
2017-03-21add support for `fstatat`Jörg Thalheim
2017-03-18Actually mark mmap and related functions as `unsafe`Kevin Mehall
The nix::sys::mman::mmap documentation says > Calls to mmap are inherently unsafe, so they must be made in an unsafe block. however, the function was not actually marked unsafe. * `munmap` should also be `unsafe` for obvious reasons. * `madvise` should be `unsafe` because of the MADV_DONTNEED flag. * `mlock` was already marked `unsafe` * `munlock` and `msync` don't strictly need to be `unsafe` despite taking pointers AFAICT, but are marked `unsafe` for consistency and in case they add additional flags in the future.
2017-02-27Auto merge of #506 - asomers:aio3, r=posborneHomu
Improve AIO API - Turn most `aio_*` functions into `AioCb` methods - Add runtime checks to `AioCb` methods - Implement `Drop` for `AioCb`
2017-02-26Auto merge of #526 - Fulkerson:master, r=posborneHomu
Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS. With this nix builds for mipsel-unknown-linux-gnu.
2017-02-26Auto merge of #518 - berkowski:baud_constants, r=posborneHomu
Added BaudRate enum for termios Issue #514 Does not provide `BaudRate::EXTA` or `BaudRate::EXTB` constants. These seem to alias to `B19200` and `B38400` respectively and so break the 1:1 mapping needed by `From`. I don't know their historic use.
2017-02-25Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS.Johan Anderholm
2017-02-25epoll: Use libc_bitflags for EpollFlagsKamal Marhubi
This is possible now that EPOLLEXCLUSIVE was added to libc in https://github.com/rust-lang/libc/pull/526
2017-02-24impl Debug for AioCb and SigevNotifyAlan Somers
Also, fix style bug in AIO tests
2017-02-25Using baud constants from libcZac Berkowitz
New baud constants landed in rust-lang/libc#530, we'll use them.
2017-02-25Corrected linux baud constants to octalsZac Berkowitz
2017-02-25Added BaudRate enum for termiosZac Berkowitz
Issue #514
2017-02-23Auto merge of #503 - Idolf:bitflags, r=kamalmarhubiHomu
Fix the style for bitflags! Prefer `libc_bitflags!` over `bitflags!`. Prefer `libc::CONSTANTS` over writing the constant manually. This makes #501 unnecessary, since upstream now contains the `O_TMPFILE` constant.
2017-02-22Fix the inner type of EpollFlagsMathias Svensson
2017-02-23Auto merge of #513 - yxd-hde:fix-musl, r=posborneHomu
Fix unresolved name error when building with musl. See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-18Auto merge of #508 - aidanhs:aphs-major-minor-macros, r=posborneHomu
Implement major/minor macros, correct mkdev It appears that the previous `mkdev` was based on the kernel headers (https://github.com/torvalds/linux/blob/v4.7/include/linux/kdev_t.h#L6) which (I guess) is the internal kernel dev_t. Scrolling down the file you can see some bitshifting operations to do conversions. The new implementation(s) are based on [musl](http://git.musl-libc.org/cgit/musl/tree/include/sys/sysmacros.h?id=dbbb3734d8c0176feabd6c46e2e85bbc3b8a60af) and [glibc](https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/sysdeps/unix/sysv/linux/sys/sysmacros.h#L38), which are in agreement about how dev_t should be handled. (as it happens I suspect we could omit the shift by 32 since I don't see that in the kernel headers, but doesn't hurt to take the conservative route and mimic the libcs)
2017-02-17Implement major/minor macros, correct mkdevAidan Hobson Sayers
2017-02-16Fix some identifiers in commentsAlan Somers
2017-02-16Update bitflags to 0.7Simon Sapin