Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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>
|
|
tempfile release 3.0.9 raised the MSRV without a minor version bump.
See https://github.com/Stebalien/tempfile/issues/100
|
|
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>
|
|
1084: sys/stat: implement mkdirat r=asomers a=kevinwern
See: https://github.com/CraneStation/wasi-common/issues/16
https://linux.die.net/man/2/mkdirat
My first contribution to this repo. Tests were probably overkill...
Also, out of curiosity, is there any reason why `mkdir` is located in `unistd`? The documentation I read mentioned the function definition also being located in `sys/stat.h`.
Co-authored-by: Kevin Wern <kevin.m.wern@gmail.com>
|
|
|
|
1069: Implement copy_file_range() r=asomers a=ArniDagur
This should fix the problems with #971 and #1008.
Co-authored-by: Árni Dagur <arnidg@protonmail.ch>
|
|
|
|
Test that we can build with the minimum versions of all of our declared
dependencies. It's sufficient to test on one OS because none of the
OSes that we test in CI has OS-dependent dependencies.
|
|
|
|
1035: Implement extra traits for all types r=asomers a=Susurrus
Now that I've gotten all the extra traits implemented for `libc`, they can be easily derived for `nix`'s types. Note that this requires a bump to the minimum supported Rust version, but it's still at least 2 versions behind, so it fits in with policy.
One thing I did notice is that we have an inconsistent approach to our newtypes, where some use a struct and some a tuple struct. We should be consistent here, and should probably use a tuple struct since the name of the single field is irrelevant. This style is already suggested in our `CONVENTIONS.md` doc, so this should be uncontroversial. I'll file a PR after this is merged adding that.
Co-authored-by: Bryant Mairs <bryant@mai.rs>
|
|
This is a minor optimization that allows for reduced sizes of datatypes. Since this pointer
will never be NULL, it's safe to use here
|
|
Abstract paths should always be N-1 in length where N is the length of
the `sun_path` field (first byte is \0). Given that,
`UnixAddr::new_abstract()` should always return this N-1 length, not
just the length of the string provided (the rest of the array will be
\0s).
|
|
1.0.2 adds the ability to omit the else clause, a feature we use.
|
|
|
|
As this is now derived, having a test is unnecessary
|