Age | Commit message (Collapse) | Author |
|
|
|
1872: Misc internal optimizations r=rtzoeller a=asomers
* Make ipv4addr_to_libc const
* Use mem::transmute in ipv4addr_to_libc and ipv6addr_to_libc
Fixes #1687
Fixes #1688
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
1869: Mode flag documentation r=asomers a=JonathanWoollett-Light
Adds rustdoc to the `sys::stat::Mode` bit flags.
Co-authored-by: Jonathan <jonathanwoollettlight@gmail.com>
|
|
* Make ipv4addr_to_libc const
* Use mem::transmute in ipv4addr_to_libc and ipv6addr_to_libc
Fixes #1687
Fixes #1688
|
|
|
|
1860: Nuke deprecated Errno flags r=rtzoeller a=SUPERCILEX
`@rtzoeller` It's been quite a few releases since these have been deprecated, more bloat removal.
Co-authored-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
1854: Reformat everything r=rtzoeller a=SUPERCILEX
Unfortunately, https://github.com/nix-rust/nix/pull/1748 didn't do the trick because of https://github.com/rust-lang/rustfmt/issues/3253. This PR fully enforces global formatting.
Closes https://github.com/nix-rust/nix/issues/770
Co-authored-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
1849: Add a Statfs::flags method r=rtzoeller a=asomers
It returns the mount flags on the BSDs. On Linux, it returns a slightly different set of flags.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
It returns the mount flags on the BSDs. On Linux, it returns a slightly
different set of flags.
|
|
|
|
And fstatfs64 instead of fstatfs.
|
|
https://github.com/rust-lang/libc/pull/2963
|
|
1744: reimplement sendmmsg/recvmmsg with better API r=rtzoeller a=pacak
Motivation is explained in #1602, new version allows to receive data without performing allocations inside the receive loop and to use received data without extra copying.
This pull request contains a breaking change to API `recvmmsg` (obviously) and also affects `recvmsg` - new version does not set length of control message buffer if one is passed. Later change can be avoided with a bit more copy-paste.
Fixes #1602
Co-authored-by: Michael Baikov <manpacket@gmail.com>
|
|
|
|
See https://github.com/nix-rust/nix/pull/1744 for more details
|
|
New implementation performs no allocations after all the necessary
structures are created, removes potentially unsound code that
was used by the old version (see below) and adds a bit more
documentation about bugs in how timeout is actually handled
```
let timeout = if let Some(mut t) = timeout {
t.as_mut() as *mut libc::timespec
} else {
ptr::null_mut()
};
```
|
|
|
|
We'll be using that to reinitialize buffers later
|
|
This is already an unsafe function, dealing with pointers directly
does not make it much more unsafe but simplifies lifetimes later on
and similar to a previous commit allows to alocate a single buffer
to store all the control messages
|
|
CMSG_FIRSTHDR/CMSG_NEXTHDR operate in terms of pointers contained
inside msghdr structure, vector capacity doesn't matter for them.
This would change external behavior of recvmsg/recvmmsg in a sense
that buffer passed to store controll messages won't have it's length
updated but intended way to receive control messages is with cmsgs
iterator on `RecvMsg` which would still work.
This change is required to allow using a single vector to store
control messages from multiple packets
|
|
1743: add XFS_SUPER_NUMBER to nix::sys::statfs r=rtzoeller a=MrCroxx
Close #1742 .
Co-authored-by: MrCroxx <mrcroxx@outlook.com>
|
|
|
|
1842: add eaccess on freebsd, dragonfly and linux r=rtzoeller a=SteveLauC
#### man pages
* [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=eaccess&sektion=2&n=1)
* [DragonFly](https://man.dragonflybsd.org/?command=access§ion=2)
* [Linux](https://man7.org/linux/man-pages/man3/euidaccess.3.html)
#### difference between `eaccess` and `access/faccessat`
IMHO, `eaccess` uses effective identifiers to perform the permission check while `access/faccessat` use real IDs.
Fixes #1373
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
1846: fix '<newline>' being interpreted as html r=asomers a=rtzoeller
This is breaking nightly.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
|
|
|
|
1843: Fix typo: remove unnecessary verb from doc comment of `dup` r=rtzoeller a=magurotuna
Extremely minor one, but I found it by chance so why not open a PR :)
Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
|
|
|
|
1841: add faccessat on illumos r=asomers a=SteveLauC
This binding has been added in [libc#2953](https://github.com/rust-lang/libc/pull/2953)
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1840: Upgrade parking_lot dev-dependency to 0.12 r=asomers a=rtzoeller
We were previously stuck on 0.11 for MSRV reasons, but since bumping nix's MSRV to Rust 1.56 this is no longer the case.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
We were previously stuck on 0.11 for MSRV reasons, but since
bumping nix's MSRV to Rust 1.56 this is no longer the case.
|
|
1833: add syncfs on linux r=rtzoeller a=SteveLauC
Fixes #1818
Change has not been added to `CHANGELOG.md`, will add it when #1831 is merged, or there will be a merge conflict
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
1839: Fix clippy warnings on nightly r=asomers a=rtzoeller
Clippy is now smarter about detecting unnecessary casts and useless conversions, which means we need to be more explicit about when the conversions are needed for a subset of platforms.
Required changes found by repeatedly running the following command against a list of the supported platforms.
`xargs -t -I {} sh -c "cargo clippy -Zbuild-std --target {} --all-targets -- -D warnings || exit 255"`
I removed the casts it complained about, and then restored them with an `#[allow]` if a later target needed the cast.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
Clippy is now smarter about detecting unnecessary casts and
useless conversions, which means we need to be more explicit
about when the conversions are needed for a subset of platforms.
Required changes found by repeatedly running the following command
against a list of the supported platforms.
`xargs -t -I {} sh -c "cargo clippy -Zbuild-std --target {} --all-targets -- -D warnings || exit 255"`
I removed the casts it complained about, and then restored them
with an `#[allow]` if a later target needed the cast.
|
|
|
|
1831: re-export RLIM_INFINITY from libc r=rtzoeller a=SteveLauC
Fixes #1803
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1829: statfs: add namespace fs magic r=rtzoeller a=tammela
Namespace filesystem magic is missing from FsType constants.
Co-authored-by: Pedro Tammela <pctammela@gmail.com>
|
|
|
|
Namespace filesystem magic is missing from FsType constants.
|
|
1825: Add a `sched_getcpu` wrapper r=rtzoeller a=jonas-schievink
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
|
|
|
|
1828: bump libc to 0.2.133 r=rtzoeller a=SteveLauC
Bump `libc` so that `setgrent/getgrent/endgrent` are available on fuchsia, and thus the CI failure in #1820 will be resolved
Co-authored-by: Steve Lau <stevelauc@outlook.com>
|
|
|
|
1824: fix bugs on android armv7, because `pw.pw_passwd.is_null()` r=rtzoeller a=ClarkGuan
crash on my Android phone because `pw.pw_passwd == NULL`
Co-authored-by: wdsgyj <gongbo.guan@momenta.ai>
|
|
|