-
Notifications
You must be signed in to change notification settings - Fork 690
fcntl add F_GETPATH support for apple/netbsd/dragonfly #2142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
And, a changelog is needed |
9bde289
to
4c9219e
Compare
Feel free to ping me when you think this is ready for the final review :) |
3c24274
to
e4baa1a
Compare
e4baa1a
to
8942225
Compare
8942225
to
18aa300
Compare
PR LGTM now, BTW, a change log is needed |
Yes I waited finishing the code first, still draft ;-) |
4790fab
to
b20f47e
Compare
Nice to see asomers found a good help ;-) |
c629896
to
d800e1a
Compare
d800e1a
to
6f6129d
Compare
You'll have to raise MSRV to 1.69.0 do use CStr::from_byte_with_nul. |
7f3d28e
to
5fbf293
Compare
17f9594
to
58ef073
Compare
For the requested changes in A test function similar to the following one would be good :) #[cfg(any(
target_os = "dragonfly",
target_os = "netbsd",
target_os = "macos",
target_os = "ios"
))]
fn test_f_get_path() {
use nix::fcntl::*;
use std::{os::unix::io::AsRawFd, path::PathBuf};
use tempfile::NamedTempFile;
let tmp = NamedTempFile::new().unwrap();
let fd = tmp.as_raw_fd();
let mut path = PathBuf::new();
let res =
fcntl(fd, FcntlArg::F_GETPATH(&mut path)).expect("get path failed");
assert_ne!(res, -1);
assert_eq!(
path.as_path().canonicalize().unwrap(),
tmp.path().canonicalize().unwrap()
);
} |
58ef073
to
4ebb41e
Compare
No description provided.