Skip to content

notbsd: Add utimensat #215

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

Merged
merged 1 commit into from
Mar 7, 2016
Merged

notbsd: Add utimensat #215

merged 1 commit into from
Mar 7, 2016

Conversation

fpgaminer
Copy link
Contributor

This pull request adds the utimensat function, which is related to futimens (already in the code). utimensat allows modifying the mtime/atime using a path instead of a file descriptor, and it also allows modifying mtime/atime on a symlink (the link's inode, rather than the target inode).

I also added the two constants which can be passed to utimensat: AT_FDCWD and AT_SYMLINK_NOFOLLOW. I used http://lxr.free-electrons.com/source/include/uapi/linux/fcntl.h#L56 to get the constant values.

I tested libc::utimensat on my local system (Ubuntu 15.10). Not sure if I'm supposed to add any unit tests with this pull request or not.

@alexcrichton
Copy link
Member

Thanks! I'm rolling this up with some others in #216 to land all at once.

@alexcrichton alexcrichton merged commit f5885ee into rust-lang:master Mar 7, 2016
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