Bug 181459 - [openbsm] Add futimensat(2) call allowing to set file time with nanosecond precision
Summary: [openbsm] Add futimensat(2) call allowing to set file time with nanosecond pr...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Chagin
URL:
Keywords: feature, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2013-08-21 23:40 UTC by yuri
Modified: 2015-04-17 12:34 UTC (History)
3 users (show)

See Also:


Attachments
file.diff (12.61 KB, patch)
2013-08-21 23:40 UTC, yuri
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description yuri 2013-08-21 23:40:00 UTC
This patch adds POSIX futimensat function, which is able to set the time of the file with nanosecond precision. Both by name and by file descriptor.

Times are handled internally in struct timespec, but the function allowing to set it was missing.

Fix: Patch attached with submission follows:
Comment 1 Jilles Tjoelker freebsd_committer freebsd_triage 2013-08-22 00:04:18 UTC
This patch does not add the POSIX utimensat() and futimens() calls, but
a non-standard function. This new function only solves one of the
inexcusable problems with futimesat() (that it is limited to microsecond
precision) but not that it cannot set times on symlinks.

You can start with
http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012410.html

I wrote a man page
http://www.stack.nl/~jilles/unix/utimensat.2

I think this is close to done; it needs to be updated and re-tested.

-- 
Jilles Tjoelker
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-08-22 04:23:26 UTC
Responsible Changed
From-To: freebsd-bugs->rwatson

Robert, please assign this to whomever is most appropriate.  Thanks.
Comment 3 justin 2014-12-27 11:32:37 UTC
There are various partially complete patches for utimensat() but work seems stalled, it is a pity it failed to get it into 10.0.
Comment 4 Harrison Grundy 2015-04-17 11:44:08 UTC
I noticed that you had done some work in this area with lemul and I was hoping you could take a look at this and figure out what, if anything, needs to happen.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-04-17 11:49:45 UTC
See also:

https://reviews.freebsd.org/D1426 -- Add futimens and utimensat system calls.
Comment 6 Jilles Tjoelker freebsd_committer freebsd_triage 2015-04-17 12:34:07 UTC
futimens() and utimensat() were added to 11-current in SVN r277610.