Age | Commit message (Collapse) | Author |
|
990: Add cmsg PKTINFO for IPv4 and IPv6. r=asomers a=pusateri
Replaces #891 and attempts to address all previous concerns.
Co-authored-by: Tom Pusateri <pusateri@bangj.com>
|
|
ignore pktinfo tests on qemu mips,mips64,powerpc64
Original work by @mcginty.
|
|
997: Implement symlinkat r=asomers a=oblique
Co-authored-by: oblique <psyberbits@gmail.com>
|
|
|
|
995: Replace try! with ? r=asomers a=asomers
try! is not available in Rust 2018. It would be premature to convert the entire project to Rust 2018, since that would bump the minimum compiler to 1.31.0. But his change will help us when we do convert it eventually.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
try! is not available in Rust 2018
|
|
972: Add support of TCP_CONGESTION for setsockopt r=asomers a=Fensteer
Implementation proposal for support of TCP_CONGESTION param for `setsockopt`and `getsockopt` with the CString type.
Co-authored-by: Fensteer <fensteer@protonmail.com>
|
|
|
|
989: DragonflyBSD: Remove unused Errno's r=asomers a=levex
EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no
need for them to be in nix either. This also fixes the build on
DragonflyBSD.
r? @asomers
cc/ @mneumann
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
Co-authored-by: Levente Kurusa <lkurusa@acm.org>
|
|
EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no
need for them to be in nix either. This also fixes the build on
DragonflyBSD.
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
|
|
987: Fix builds on sparc64-unknown-linux-gnu r=asomers a=Susurrus
Co-authored-by: Bryant Mairs <bryant@mai.rs>
|
|
These constants have the same value on sparc64, so need to be removed as enums
in Rust can't have multiple names for the same value.
|
|
|
|
|
|
|
|
|
|
985: Restore the libc dependency to the git version post-release r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
983: Bump version to 0.12.0 r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
984: Prefer `map(drop)` to `map(|_| ())` r=asomers a=asomers
I previously advocated for the latter syntax on stylistic grounds. But
it generates less efficient code, because it creates a new lambda
function for each usage. The optimizer does not combine them. This
change saves about 6KB of code.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
I previously advocated for the latter syntax on stylistic grounds. But
it generates less efficient code, because it creates a new lambda
function for each usage. The optimizer does not combine them. This
change saves about 6KB of code.
|
|
|
|
982: Fix libc at 0.2.44 in preparation for release r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
977: Error as i32 r=asomers a=asomers
Add Error::as_errno
This method is useful when it can be statically determined that a nix::Error be an errno, which I find to be very common.
Also, fix some recently introduced compiler warnings.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
967: Add a wrapper for lutimes(2) r=asomers a=jmmv
PR #944 added wrappers for the more-modern futimens(2) and utimesat(2),
but unfortunately these APIs are not available on old-ish systems.
In particular, macOS Sierra and below don't implement them, making the
new APIs unusable. Whether we should care about such "old" systems is
debatable, but the problem is that, at the moment, this is the only
macOS version usable on Travis to test kexts and, thus, to test FUSE
file systems.
This should have been part of PR #946, which added a wrapper for
utimes(2) following this same rationale, but missed lutimes(2) because
I simply didn't notice it existed.
Co-authored-by: Julio Merino <julio@meroh.net>
|
|
|
|
This method is useful when it can be statically determined that a
nix::Error be an errno, which I find to be very common.
|
|
975: Add execvpe support, conditional on platform r=asomers a=F1rst-Unicorn
This closes #682
Co-authored-by: F1rst-Unicorn <f1rst_unicorn@njsm.de>
|
|
|
|
973: CHANGELOG: move entry from #884 from 0.11.0 to [Unreleased] r=asomers a=mpasternacki
PR #884 added changelog entry in section for 0.11.0, which has been already released, instead of in the [Unreleased] section (which wasn't present yet). Moved the entry where it belongs.
Co-authored-by: Maciej Pasternacki <maciej@3ofcoins.net>
|
|
|
|
970: Add example for setsockopt r=asomers a=povilasb
> Every great project needs great documentation
...one step at a time though :)
Co-authored-by: Povilas Balciunas <balciunas90@gmail.com>
|
|
Makes it easier for newcomers :)
|
|
968: Make sys::time::{time_t, suseconds_t} public r=asomers a=jmmv
This allows handling the return values of other public functions
(such as TimeVal's tv_sec and tv_usec) without having to pull in
these types from libc (which is ugly if a project is trying to
use nix exclusively to avoid libc's unsafety).
Co-authored-by: Julio Merino <julio@meroh.net>
|
|
PR #944 added wrappers for the more-modern futimens(2) and utimesat(2),
but unfortunately these APIs are not available on old-ish systems.
In particular, macOS Sierra and below don't implement them, making the
new APIs unusable. Whether we should care about such "old" systems is
debatable, but the problem is that, at the moment, this is the only
macOS version usable on Travis to test kexts and, thus, to test FUSE
file systems.
This should have been part of PR #946, which added a wrapper for
utimes(2) following this same rationale, but missed lutimes(2) because
I simply didn't notice it existed.
|
|
This allows handling the return values of other public functions
(such as TimeVal's tv_sec and tv_usec) without having to pull in
these types from libc (which is ugly if a project is trying to
use nix exclusively to avoid libc's unsafety).
|
|
966: Require Rust 1.24.1 r=asomers a=Susurrus
`lazy_static` as of 1.2 requires Rust 1.24.1, so make that our minimum required. This was discovered when I looked into the failures of #965.
@asomers if you agree with this change, could you update the buildbots here too?
Co-authored-by: Bryant Mairs <bryantmairs@google.com>
|
|
lazy_static as of 1.2 requires Rust 1.24.1, so make that our minimum required version
|
|
962: exclude more CI files from crates.io r=asomers a=ignatenkobrain
Co-authored-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
961: Add sync (fix #959) r=asomers a=r-darwish
Co-authored-by: Roey Darwish Dror <roey.ghost@gmail.com>
|
|
|
|
958: Added AddressType type to ptrace::linux + peek/poke user fix r=asomers a=xd009642
This was added to the BSD ptrace API and probably should have been added to the linux API to make it easier to write code for both platforms without the user having to reexport the types to their own crate.
I went to use the latest nix myself and found that having this added would improve usability for nix users.
Could potentially add a type for what they return (BSDs: `c_int`, linux: `c_long`). Data input might be trickier as linux is `*mut c_void` and BSD just takes data as `c_int`.
Co-authored-by: xd009642 <danielmckenna93@gmail.com>
|
|
|
|
This was added to the BSD ptrace API and probably should have been added to tyhe linux API to make it easier to write code for both platforms without the user having to reexport the types to their own crate.
|
|
952: Add wrapper for acct(2) r=asomers a=jabedude
This PR aims to add a nix wrapper for acct(2).
Co-authored-by: Josh Abraham <sinisterpatrician@gmail.com>
|
|
This patch adds a wrapper for the acct(2) syscall, with two functions
for enabling and disabling process accounting.
|
|
949: ptrace support for BSDs r=Susurrus a=xd009642
This PR adds support to the ptrace API for BSDs to close #947. It also adds a read and write method for reading and writing to a traced processes memory. The ptrace API created for linux offers this via a deprecated function so I added this so they can be feature equivalent without replicating a deprecated part of the API.
Due to the differences in ptrace on BSD and linux I've made a ptrace module to keep things readable.
Still to do - revert travis config to remove my feature branch and update the changelog.
Co-authored-by: xd009642 <danielmckenna93@gmail.com>
|
|
* Moved ptrace API into it's own module with cfg'ed modules exported for linux/android or BSDs.
* Replicated current linux API for BSD
* Added API functions to peek and poke memory to avoid needing to replicate deprecated linux API and remaining feature complete
* Added helper function for `PTRACE_KILL` requests
* Updated tests based on new API changes
* Added addition kill calls to `test_ptrace_cont` as inferior death doesn't happen immediately on OSX which caused issues in the tests.
|