Skip to content
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

add support for openat #551

Closed
wants to merge 1 commit into from
Closed

add support for openat #551

wants to merge 1 commit into from

Conversation

Mic92
Copy link
Contributor

@Mic92 Mic92 commented Mar 8, 2017

No description provided.

src/fcntl.rs Outdated
#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn openat<P: ?Sized + NixPath>(dirfd: RawFd, path: &P, oflag: OFlag, mode: Mode) -> Result<RawFd> {
let fd = try!(path.with_nix_path(|cstr| {
unsafe { libc::openat(dirfd, cstr.as_ptr(), oflag.bits(), mode.bits() as c_uint) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the cast to c_uint necessary? The Mode flags type is defined as mode_t which should be the right type from libc.

@kamalmarhubi
Copy link
Member

Thanks for the PR! Could you also add an entry to the changelog for this?

@Mic92 Mic92 force-pushed the openat branch 3 times, most recently from c351fad to f2df347 Compare March 20, 2017 15:47
@Mic92
Copy link
Contributor Author

Mic92 commented Mar 20, 2017

done, also extended platform support.

@Mic92
Copy link
Contributor Author

Mic92 commented Mar 20, 2017

replaced by #552

@Mic92 Mic92 closed this Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants