Age | Commit message (Collapse) | Author |
|
process_vm_readv requires it, and I'm not exactly sure which other
things do too.
|
|
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>
|
|
1113: Libc enum tryfrom r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
TryFrom wasn't stable when that function was written.
|
|
|
|
1114: Replace most instances of mem::uninitialized with mem::MaybeUninit r=asomers a=asomers
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.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
On Travis (and only on Travis) this test crashes. It hits an internal
assertion within glibc. It happens reliably with rustc 1.37.0. Ignore
the test until Travis updates its images; then we'll try again.
Issue #1099
|
|
Travis's "stable" images are stuck on Rust 1.35.0
|
|
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
|
|
1107: Clippy cleanup r=asomers a=asomers
This is preparation for several changes relating to raising the MSRV, most importantly eliminating `mem::uninitialized`.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
|
|
It was leftover from internal churn during PR #1020.
|
|
|
|
|
|
|
|
1108: Raise minimum supported Rust version to 1.36.0 r=asomers a=otavio
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
Weirdly, musl uses i32 to store the ioctl opcode
|
|
The minimum supported Rust version is being raised to 1.36.0 as this
is the first release to support the `mem::MaybeUninit` feature.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|
1109: fix readlink/readlinkat to return too long only when it is long r=asomers a=sendilkumarn
Currently readlink returns `ENAMETOOLONG` when the bufferSize is equal to the result size.
Consider the below case
```c++
int main(int argc, const char * argv[]) {
std::string filename = "/tmp/test-dir/target";
size_t bufferSize = 9;
char* buffer = new char[bufferSize];
size_t rc = readlink (filename.c_str(), buffer, bufferSize);
// Since `readlink's` output depends on the `bufferSize`. If the`bufferSize` is 9 or greater than
// 9 then it will return 9 or else it will return `bufferSize` as the value of `rc`.
return 0;
}
```
Co-authored-by: Sendil Kumar <sendilkumarn@live.com>
Co-authored-by: Sendil Kumar N <sendilkumarn@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104: Release v0.15.0 r=asomers a=asomers
It's important to release fairly soon, because rustc 1.38.0 will deprecate std::mem::uninitialized.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
1097: Add renameat, AT_FDCWD r=asomers a=scottlamb
Co-authored-by: Scott Lamb <slamb@slamb.org>
|
|
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
|
|
check is faster than build.
|
|
* 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?
|
|
1091: socket: add support for AF_VSOCK r=asomers a=stefano-garzarella
This patch adds the support of AF_VSOCK in the socket module.
VSOCK is present since Linux 3.9.
Co-authored-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
The current VSOCK implementation does not support loopback devices,
so, for now, we expect a failure in the spawned thread when it
tries to connect.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
This patch adds AF_VSOCK support to AddressFamily in order to use
VSOCK socket.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
1089: implement posix_fadvise r=asomers a=kevinwern
See:
https://github.com/CraneStation/wasi-common/issues/16
http://man7.org/linux/man-pages/man2/posix_fadvise.2.html
Conditional compilation derived from corresponding libc conditions:
Fuchsia:
https://github.com/rust-lang/libc/blob/0b02c4060a750983cebcccdf1f35a5ec4cdcf516/src/fuchsia/mod.rs#L3807
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/lib.rs#L104-L109
uClibc:
https://github.com/rust-lang/libc/blob/11c762c535cb43dda3d9d87a0845c55201a905fb/src/unix/uclibc/mod.rs#L1676
https://github.com/rust-lang/libc/blob/ce7e3a7e866dd7109a971b694a2bf58bd08f101a/src/unix/mod.rs#L1141-L1143
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/lib.rs#L116-L121
Linux, android, emscripten:
https://github.com/rust-lang/libc/blob/11c762c535cb43dda3d9d87a0845c55201a905fb/src/unix/linux_like/mod.rs#L1303
https://github.com/rust-lang/libc/blob/ce7e3a7e866dd7109a971b694a2bf58bd08f101a/src/unix/mod.rs#L1147-L1151
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/lib.rs#L116-L121
FreeBSD:
https://github.com/rust-lang/libc/blob/e0ff1e68b9e34173e9c4c3217d1b0fc81a7d352d/src/unix/bsd/freebsdlike/freebsd/mod.rs#L1223
https://github.com/rust-lang/libc/blob/ce7e3a7e866dd7109a971b694a2bf58bd08f101a/src/unix/bsd/freebsdlike/mod.rs#L1307-L1309
https://github.com/rust-lang/libc/blob/ce7e3a7e866dd7109a971b694a2bf58bd08f101a/src/unix/bsd/mod.rs#L683-L685
https://github.com/rust-lang/libc/blob/ce7e3a7e866dd7109a971b694a2bf58bd08f101a/src/unix/mod.rs#L1152-L1159
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/lib.rs#L116-L121
WASI:
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/wasi.rs#L1001
https://github.com/rust-lang/libc/blob/0e702c1b4e2e56788e8b67d3efd9c242807c3d4b/src/lib.rs#L134-L139
Co-authored-by: Kevin Wern <kevin.m.wern@gmail.com>
|
|
1085: Minimal versions r=asomers a=asomers
Build test with -Zminimal-versions in CI.
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
|
|
1090: Expose sched_yield on non-linux-like hosts r=asomers a=kubkon
Currently, `sched` module is compiled only for linux-like hosts. However, the recently added syscall `sched_yield` is universal to all *nixes. This PR pulls all linux-like functionality into a private `sched_linux_like` module which is enabled only for android and linux hosts, while `sched_yield` and `sched` modules are now compiled for all *nixes, thus, correctly exposing `sched_yield` to other non-linux hosts.
Co-authored-by: Jakub Konka <jakub.konka@golem.network>
|
|
|
|
|
|
|
|
1094: Restrict tempfile to < 3.0.9 r=asomers a=asomers
tempfile release 3.0.9 raised the MSRV without a minor version bump.
See https://github.com/Stebalien/tempfile/issues/100
Co-authored-by: Alan Somers <asomers@gmail.com>
|