summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-04Add FsType for cgroupfsKenta Tada
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2020-07-03Merge #1259bors[bot]
1259: implement ttyname and ttyname_r r=asomers a=doy this fixes #1204. i know this at least works on linux, but i'm not super sure about other platforms - happy to add conditionals if it makes sense. Co-authored-by: Jesse Luehrs <doy@tozt.net>
2020-07-03implement ttynameJesse Luehrs
2020-07-03Merge #1244bors[bot]
1244: Clippy cleanup r=asomers a=asomers Reported-by: Clippy Co-authored-by: Alan Somers <asomers@gmail.com>
2020-07-03Merge #1264bors[bot]
1264: Update the FreeBSD test image to 11.4-release r=asomers a=asomers And temporarily disable travis targets Co-authored-by: Alan Somers <asomers@gmail.com>
2020-07-03Update the FreeBSD test image to 11.4-releaseAlan Somers
2020-07-03Merge #1268bors[bot]
1268: Drop support for powerpc64-unknown-linux-gnu r=asomers a=asomers The build is failing due to no fault of Nix. Even rust-embedded/cross has given up on fixing it, so there's no hope for us. Fixes #1267 See also https://github.com/rust-embedded/cross/pull/440 Co-authored-by: Alan Somers <asomers@gmail.com>
2020-07-02Drop support for powerpc64-unknown-linux-gnuAlan Somers
The build is failing due to no fault of Nix. Even rust-embedded/cross has given up on fixing it, so there's no hope for us. Fixes #1267 See also https://github.com/rust-embedded/cross/pull/440
2020-06-30Merge #1263bors[bot]
1263: Don't run redoxer in CI r=asomers a=asomers It's unreliable. It frequently hangs starting the Docker image, before Cargo gets involved. Instead, use cargo to do a cross-build for Redox. Do it manually, since rust-embedded/cross doesn't support Redox. https://github.com/nix-rust/nix/issues/1258 https://github.com/rust-embedded/cross/issues/427 Co-authored-by: Alan Somers <asomers@gmail.com>
2020-06-27Fix an "unused import" warning on muslAlan Somers
2020-06-27misc clippy cleanupAlan Somers
2020-06-27Make SockAddr::as_ffi_pair safeAlan Somers
It was only marked unsafe because it did a pointer cast, but that particular pointer cast is always allowed by C.
2020-06-27Make Errno::clear safeAlan Somers
All it does is assign a value to a thread-local int. There's nothing unsafe about that.
2020-06-27Prefer to pass Inotify by value instead of by referenceAlan Somers
It's small and `Copy`, so pass by value is more efficient. This is technically a breaking change, but most code should compile without changes.
2020-06-27implement Default for UnixCredentials on LinuxAlan Somers
2020-06-27implement `Default` for `CpuSet`.Alan Somers
2020-06-27Make sys::socket::sockaddr_storage a safe functionAlan Somers
It already fully validated its arguments, so there's no need for it to be `unsafe`.
2020-06-27Fix an unaligned pointer read in Inotify::read_eventsAlan Somers
Reported-by: Clippy
2020-06-27Don't run redoxer in CIAlan Somers
It's unreliable. It frequently hangs starting the Docker image, before Cargo gets involved. Instead, use cargo to do a cross-build for Redox. Do it manually, since rust-embedded/cross doesn't support Redox. https://github.com/nix-rust/nix/issues/1258 https://github.com/rust-embedded/cross/issues/427
2020-06-27Merge #1222bors[bot]
1222: Add Ipv{4,6}PacketInfo support to ControlMessage for send{m,}msg. r=asomers a=isomer This adds Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage, allowing these to be used with sendmsg/sendmmsg. Co-authored-by: Perry Lorier <perryl@google.com>
2020-06-26Add Ipv{4,6}PacketInfo support to ControlMessage for send{m,}msgPerry Lorier
This adds Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage, allowing these to be used with sendmsg/sendmmsg. This change contains the following squashed commits: Add Ipv{4,6}PacketInfo to ControlMessage. Add documentation links to Ipv{4,6}PacketInfo Add changelog entry for Ipv{4,6}PacketInfo Add link to PR in the Changelog. Add extra build environments. Add tests for Ipv{4,6}PacketInfo. Swap #[test] and #[cfg] The CI appears to be running the test, even though it's not cfg'd for that platform. I _think_ this might be due to these being in the wrong order. So lets try swapping them. s/freebsd/netbsd/ for Ipv4PacketInfo netbsd supports in_pktinfo, not freebsd. Fix the cfg for Ipv{4,6}PacketInfo usage. Ah, I see what I did wrong. I had fixed the definitions, but I had the wrong cfg() in the usage. This has the usage match the definitions. Change SOL_IPV6 to IPPROTO_IPV6. FreeBSD doesn't have SOL_IPV6, but does have IPPROTO_IPV6, and the two constants are defined as being equal. So change to use IPPROTO_IPV6. Skip Ipv6PacketInfo test if v6 is not available. If IPv6 is not available, then when we try and bind to ip6-localhost, we'll get a EADDRNOTAVAIL, so skip the test. This should mean that the test will run on any machine that has a v6 loopback address. More architecture cfg() fixes. These all need to be the same, and they were not. Make them them all the same. Attempt III. Fix up mismatched cfg's again. Take IV. Make sure the cfg's that use a enum variant match the enum definition.
2020-06-12Merge #1255bors[bot]
1255: Remove several deprecated constants and functions r=asomers a=asomers * `unistd::daemon` on Apple * `unistd::pipe2` on Apple * `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple * `sys::event::FilterFlag::NOTE_REAP` on Apple * `sys::ptrace::ptrace` on Android and Linux All have been deprecated for more than two releases and one year. Co-authored-by: Alan Somers <asomers@gmail.com>
2020-06-12Merge #1257bors[bot]
1257: Add fchown(2) wrapper r=asomers a=nateavers Mentioned [in #1029](https://github.com/nix-rust/nix/issues/1029#issuecomment-622972782). Co-authored-by: Nate Avers <nathan.avers@alumni.case.edu>
2020-06-12Add fchown(2) wrapper.Nate Avers
2020-06-05Respond to review commentsAlan Somers
2020-06-04Merge pull request #1235 from nix-rust/termios_constructorBryant Mairs
Limit internal termios API to pub(crate)
2020-06-04Remove several deprecated constants and functionsAlan Somers
* `unistd::daemon` on Apple * `unistd::pipe2` on Apple * `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple * `sys::event::FilterFlag::NOTE_REAP` on Apple * `sys::ptrace::ptrace` on Android and Linux All have been deprecated for more than two releases and one year.
2020-06-04Limit internal termios API to pub(crate)Bryant Mairs
2020-05-31fixup to "Convert the crate to edition 2018"Alan Somers
2020-05-31Fix test_ptymaster_drop after PR #1098Alan Somers
This test cannot be compiled under Redox. PR #1098 attempted to disable it for Redox, but actually disabled it everywhere. AFAICT, Cargo has no syntax to conditionally enable a target, except based on features. Instead, use conditional compilation within the test.
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-31Merge #1252bors[bot]
1252: Add EV_DISPATCH, EV_RECEIPT items for EventFlags, and fix build on OpenBSD r=asomers a=nickpelone This pull request: - Adds `EV_DISPATCH` and `EV_RECEIPT` to `EventFlags`. OpenBSD supports these now. c379d1a - Fixes a regression that caused `nix` to be unable to build on OpenBSD since #1208. dd0a990 - Makes a change to avoid a deprecation warning from `libc` crate, which breaks tests. 0f9fcbd Since I know y'all don't have OpenBSD in CI right now, I've attached the results of a `cargo test` run on OpenBSD 6.7. Thanks for your time! [testresults.txt](https://github.com/nix-rust/nix/files/4684597/testresults.txt) Fixes #1251 Co-authored-by: Nick Pelone <nick.pelone@calyptix.com>
2020-05-26Update CHANGELOG.md now that I have a PR numberNick Pelone
2020-05-26Fix use of deprecated libc type, needed in order to run the tests ↵Nick Pelone
successfully. This type was deprecated in libc 0.2.55.
2020-05-26Fix build on OpenBSD caused by erroneous inclusion in allowed OS list for ↵Nick Pelone
sendmmsg() / recvmmsg() in #1208. In #1208, sendmmsg() / recvmmsg() were added, but OpenBSD(who doesn't support these) was included on the list of allowed operating systems for sendmmsg() related things. This broke the build on OpenBSD. For more Rust-world examples, see: https://github.com/rust-lang/libc/commit/6f6297301d49ff67b8ca044d651f36a56950298c
2020-05-26Add EV_DISPATCH and EV_RECEIPT EventFlag items for OpenBSD.Nick Pelone
2020-05-20Merge #1098bors[bot]
1098: Add Redox support for most of the modules r=asomers a=AdminXVII Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438 Co-authored-by: Xavier L'Heureux <xavier.lheureux@icloud.com> Co-authored-by: Xavier L'Heureux <dev.xlheureux@gmail.com>
2020-05-19Add Redox to Tier 3Xavier L'Heureux
2020-05-17Simply disable the dir module, since only the entry struct is availableXavier L'Heureux
2020-05-17Fix test and remove group & user for redoxXavier L'Heureux
- Make sure all tests pass the CI - Redox does not (yet) have passwd functions, so remove it
2020-05-17Add wait, fdatasync, poll and pause for RedoxXavier L'Heureux
2020-05-17Remove warnings when compiling for RedoxXavier L'Heureux
2020-05-17Add redoxer testing for travisXavier L'Heureux
2020-05-17Disable mkfifo for RedoxXavier L'Heureux
FIFOs are not supported (yet?) by RedoxFS, so disable it
2020-05-17Remove temporarily the failing tests for RedoxXavier L'Heureux
TODO: Fix them in Relibc
2020-05-17Make sure to leave the values as-is in openXavier L'Heureux
2020-05-17Add pollXavier L'Heureux
2020-05-17Add termio supportXavier L'Heureux
2020-05-17Remove more unsupported functions and make it possible to run testsXavier L'Heureux
2020-05-17Add Redox support for most of the modulesXavier L'Heureux
Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438