Age | Commit message (Collapse) | Author |
|
|
|
The fix for #1149 has the logic for the [cfg()] conditional inverted
so that the aliases for VMIN and VTIME are defined on targets that
are not linux-sparc64.
|
|
1139: Add `Users` and `Group` related functions r=asomers a=otavio
This was a collaborative work between Johannes Schilling
<dario@deaktualisierung.org>, Fredrick Brennan <copypaste@kittens.ph>
and myself.
This PR is a split-off from #864 so we merge ready parts first. Next, we work on the iterators.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
On sparc64, glibc defines VMIN as VEOF and VTIME as VEOL for
termios, so we need to inherit these alias definitions for
nix-rust as well.
Fixes #1149
|
|
This was a collaborative work between Johannes Schilling
<dario@deaktualisierung.org>, Fredrick Brennan <copypaste@kittens.ph>
and myself.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
1138: Add Signal::as_str() to get representation as static string r=asomers a=MikailBag
# Motivation
Currently string representation of signal can be obtained with AsRef<str> impl.
But it has downside: returned string's lifetime is bound to lifetime of signal, so &str must be converted to String. This allocation is avoidable, because as_ref() only returns static strings. To fix this problem, my PR adds Signal::as_str() method, which returns static string.
Co-authored-by: Mikail Bagishov <bagishov.mikail@yandex.ru>
|
|
|
|
recvfrom(2) only returns the sender's address for protocols that provide
it. Usually, that means it returns the sender's address for datagram
sockets but not for stream sockets.
Fixes #1144
|
|
|
|
Because of the use of MaybeUninit::uninit, the padding fields in msghdr,
which only present on musl builds, are not initialized. Causing garbage
data to be sent to the kernel. This change ensures the paddings are
always zeroed.
|
|
ignore mkfifoat in OSX and andriod
|
|
|
|
1121: Fix #1093 r=asomers a=tathanhdinh
Hello,
This PR fixes the problem discovered in #1093.
Thanks for any comment.
1130: unistd: getgrouplist: Rework code to use `reserve_double_buffer_size` r=asomers a=otavio
The buffer resize logic can be simplified reusing the
`reserve_double_buffer_size` method.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Ta Thanh Dinh <tathanhdinh@gmail.com>
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
1105: posix_fallocate support r=asomers a=dingxiangfei2009
This PR add [`posix_fallocate`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html), which is available on
- Linux
- FreeBSD
- Android
- Emscripten
- Fuchsia
- WASI
Here is a question: for some reason, `posix_fallocate` returns `EBADF` instead of `EPIPE` if a FIFO file descriptor is passed in on Linux 4.19.64. In the test `EBADF` is used for now, but I would like to know if such behaviour is expected.
Co-authored-by: Ding Xiang Fei <dingxiangfei2009@gmail.com>
|
|
The buffer resize logic can be simplified reusing the
`reserve_double_buffer_size` method.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
Use `reserve_double_buffer_size` up to NGROUPS_MAX as limit.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
We are preparing the use of `reserve_double_buffer_size` but for this,
some logic need to be reworked so we are doing some rename preparing
for the next patch which adds its use.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
|
|
We now have a `reserve_double_buffer_size` method which reserves the
double of buffer, up to a limit, allowing it to be reused on other
methods in future.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
`assert_eq!` gives more debug info when the test fails by default than
`assert!`. This should help make debugging easier.
|
|
|
|
1120: Fix length of abstract socket address r=asomers a=yshui
NULL bytes have no special significance in an abstrace address, and the
length of the address is solely decided by the length member. If the
length is set to sun_path.len(), all the NULL bytes will be considered
part of the address.
Tests are updated accordingly.
Closes #1119
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Co-authored-by: Yuxuan Shui <yshuiv7@gmail.com>
|
|
NULL bytes have no special significance in an abstrace address, and the
length of the address is solely decided by the length member. If the
length is set to sun_path.len(), all the NULL bytes will be considered
part of the address.
Tests are updated accordingly.
Closes #1119
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
|
|
TryFrom wasn't stable when that function was written.
|
|
|
|
Only two instances remain:
* For the deprecated sys::socket::CmsgSpace::new. We should probably
just remove that method.
* For sys::termios::Termios::default_uninit. This will require some
more thought.
Fixes #1096
|
|
|
|
|
|
It was leftover from internal churn during PR #1020.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renameat is (somewhat oddly, imho) in stdio.h. I put it in
nix::fcntl because there's no nix::stdio and all its friends
(including the AT_* constants) are in nix::fcntl.
|
|
1058: Implement unlinkat r=asomers a=jlb6740
This adds the unlinkat function, which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html
and widely implmented on Unix-family platforms.
Co-authored-by: Johnnie Birch <45402135+jlb6740@users.noreply.github.com>
|
|
This adds the unlinkat function, which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html
and widely implmented on Unix-family platforms.
Implement unlinkat - Update comments to unlink at and breakup tests
Changes made based on comments from pull request #1058
Implement unlinkat - Update should_panic for more precise check
Updae should_panic attribute for more precise check. Also remove
some dead code and note the pull request ID.
Implement unlinkat - Update error handling to use unwrap_err
The previous patch failed testing on two targets that returned EPERM
as the Sys error instead of EISDIR. This patch changes from using the
should_panic attribute to using the unwrap_err and matching against
the result.
Implement Unlinkat - Passing tests should not print anything. Fix.
Implement unlinkat - Update location of commit comment in the CHANGELOG
Implement unlinkat - Remove newline
|
|
1095: Fix warnings on Rust 1.37.0 r=asomers a=asomers
* Replace obsolete range syntax "..." with inclusive range "..="
* Use dyn Trait syntax instead of Box<Trait>
* Raise MSRV to 1.27.0 (for dyn Trait syntax)
* Test with nightly again
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
This fixes the tests on Rust 1.38.0. We'll fix them for real after
release 0.15.0.
Issue #1096
|
|
* Replace obsolete range syntax "..." with inclusive range "..="
* Use dyn Trait syntax instead of Box<Trait>
* Raise MSRV to 1.27.0 (for dyn Trait syntax)
* Raise MSRV to 1.31.0 (because of rand)
tempfile pulls in rand, and rand pulls in fuchsia-cprng, which requires
1.31.0. Why rand pulls in fuchsia-cprng I don't know. It's specified
as a target-specific dependency, but Cargo tries to build it anyway
(only on Linux, not on FreeBSD or OSX). A bug in Cargo 1.27.0?
|
|
This patch adds AF_VSOCK support to AddressFamily in order to use
VSOCK socket.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
|
|
|
|
|
928: Wrap libc::statfs r=asomers a=alesharik
Fix for [#926](https://github.com/nix-rust/nix/issues/926)
Co-authored-by: alesharik <alesharikreserv@yandex.ru>
|
|
|
|
|
|
|