Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-07-24 | Mark most C-derived enums as non_exhaustive | Alan Somers | |
Since libc may add new variants at any time, Nix's consumers should not use exhaustive match patterns. Fixes #1182 | |||
2021-07-07 | Overhaul Nix's error types | Alan Somers | |
For many of Nix's consumers it be convenient to easily convert a Nix error into a std::io::Error. That's currently not possible because of the InvalidPath, InvalidUtf8, and UnsupportedOperation types that have no equivalent in std::io::Error. However, very few of Nix's public APIs actually return those unusual errors. So a more useful API would be for Nix's standard error type to implement Into<std::io::Error>. This commit makes Error a simple NewType around Errno. For most functions it's a drop-in replacement. There are only three exceptions: * clearenv now returns a bespoke error type. It was the only Nix function whose error couldn't be cleanly mapped onto an Errno. * sys::signal::signal now returns Error(Errno::ENOTSUP) instead of Error::UnsupportedOperation when the user passes an incompatible argument to `handler`. * When a NixPath exceeds PATH_MAX, it will now return Error(Errno::ENAMETOOLONG) instead of Error::InvalidPath. In the latter two cases there is now some abiguity about whether the error code was generated by Nix or by the OS. But I think the ambiguity is worth it for the sake of being able to implement Into<io::Error>. This commit also introduces Error::Sys() as a migration aid. Previously that as an enum variant. Now it's a function, but it will work in many of the same contexts as the original. Fixes #1155 | |||
2020-05-31 | Convert the crate to edition 2018 | Alan Somers | |
2020-05-16 | Apply `repr(transparent)` to several FFI types | Alan Somers | |
repr(transparent) is required in order to safely cast between an FFI type and its NewType. This commit applies that attribute to PollFd, EpollEvent, IpMembershipRequest, Ipv6MembershipRequest, TimeVal, and IoVec. Fixes #1241 | |||
2019-06-09 | Add extra traits for all types | Bryant Mairs | |
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all traits are supported by all types, which is why many are missing some. | |||
2018-01-28 | Require Debug impls for all types | Bryant Mairs | |
2018-01-28 | Deny unused qualifications | Bryant Mairs | |
2017-12-10 | Add more derives for SignalFd and various enums | Bryant Mairs | |
2017-12-04 | Stop reexporting `Errno` and its variants | Jonas Schievink | |
cc #664 (unsure if this is everything needed) | |||
2017-12-01 | Fix UB in epoll_ctl | Bryant 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-08-16 | Replace ffi constants with libc in epoll | Bryant Mairs | |
2017-08-16 | Match libc_bitflags! syntax to upstream bitflags! | Bryant Mairs | |
2017-02-25 | Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS. | Johan Anderholm | |
2017-02-25 | epoll: Use libc_bitflags for EpollFlags | Kamal Marhubi | |
This is possible now that EPOLLEXCLUSIVE was added to libc in https://github.com/rust-lang/libc/pull/526 | |||
2017-02-22 | Fix the inner type of EpollFlags | Mathias Svensson | |
2017-02-19 | Fix the style for bitflags! | Mathias Svensson | |
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually. | |||
2017-02-16 | Update bitflags to 0.7 | Simon Sapin | |
2016-12-19 | fix all and update CHANGELOG.md | qupeng | |
2016-12-12 | EpollEvent::empty(): using mem::zeroed instead of mem::uninitialized. | qupeng | |
2016-12-12 | epoll: improve EpollEvent::empty() by using mem::uninitialized. | qupeng | |
2016-12-11 | fix EpollEvent::empty() | qupeng | |
2016-12-11 | add empty() in EpollEvent. | qupeng | |
2016-12-11 | fix #480 and add simple test cases for that. | qupeng | |
r? @fiveop | |||
2016-09-15 | Rename EpollEventKind to EpollFlags, according to convention. | Philipp Matthias Schaefer | |
2016-09-15 | Add EpollCrateFlags bitflag type. | Philipp Matthias Schaefer | |
2016-09-08 | Add property readers to EpollEvent | Philipp Matthias Schaefer | |
2016-09-08 | Readd EpollEvent | Philipp Matthias Schaefer | |
2016-09-08 | Use libc's declarations | Hiroki Noda | |
2016-09-08 | Not to set EPOLL_CLOEXEC by default. | Hiroki Noda | |
2016-09-08 | Add epoll_create1 and set EPOLL_CLOEXEC flag by default. | Hiroki Noda | |
2016-03-28 | epoll: Add EPOLLEXCLUSIVE flag. | kubo39 | |
EPOLLEXCLUSIVE flag is available in Linux4.5. | |||
2016-01-28 | Move errno::Result back to crate root | arcnmx | |
2016-01-28 | Errno::result() | arcnmx | |
2015-09-03 | Fix the struct packing of EpollEvent | Alex Gulyás | |
2015-08-12 | Update some stuff for upstream bitflags changes | Corey Richardson | |
2015-07-20 | Derive Clone for EpollEvent on android. | Carl Lerche | |
Fixes #165 | |||
2015-05-28 | Remove std::os::unix::io::RawFd re-export | Carl Lerche | |
2015-05-24 | Change epoll_wait to use isize timeout_ms. | Cole Reynolds | |
A timeout of -1 makes epoll block indefinitely, a usize timeout means we can't specify this behavior; using isize fixes this. | |||
2015-04-03 | 'derive(Copy)' needs Clone now | Florian Hartwig | |
2015-03-24 | NixResult -> nix::Result; NixError -> nix::Error | Carl Lerche | |
2015-03-13 | Amend some files to make it compile on arm-linux-androideabi. | kennytm | |
2015-02-10 | Add `NixPath`, `NixError`, and `NixResult`. | Utkarsh Kukreti | |
2015-01-27 | Fix warnings for `rustc 1.0.0-dev (e365e4c05 2015-01-27 08:40:39)`. | Utkarsh Kukreti | |
2015-01-13 | changed uint and int to usize and isize respectively | Rick Richardson | |
2015-01-04 | Fix a few remaining deprecation notices | Carl Lerche | |
2014-12-18 | Add all now needed ';' after macro invocations. | Victor Berger | |
2014-12-15 | bitflags! derives Copy for you now, so remove our derivings. | Jonathan Reem | |
2014-12-10 | Fallout of Copy becoming opt-in. | Victor Berger | |
2014-12-10 | Fix improper_ctypes warnings. | Victor Berger | |
2014-10-10 | Update static->const | Tilde Engineering | |