utimens(2) system call

Variant of utime(2) with struct timespec (with ns precision)
instead of time_t values; also allows for tv_nsec members
the values UTIME_NOW (force update to current time) or
UTIME_OMIT (allow to set either atim or mtim independently.)

Provides a superset of utimes(2), futimes(2), lutimes(2),
and futimens(2).
Provides the same subset of utimensat(2) as does NetBSD 6.
Also import utimens() and lutimeNS() from NetBSD-current.
This commit is contained in:
Antoine Leca
2011-12-24 15:02:54 +01:00
committed by Ben Gras
parent 88414c568c
commit 9131e98a7d
19 changed files with 385 additions and 16 deletions

View File

@@ -142,10 +142,12 @@ lchown(const char *path, uid_t owner, gid_t group)
#endif
static int
utimes(const char *path, const struct timeval times[2])
fake_utimes(const char *path, const struct timeval times[2])
{
return -1;
}
#undef utimes
#define utimes(path, times) fake_utimes(path, times)
#endif
int