MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kern_lutimes

Function kern_lutimes

freebsd/kern/vfs_syscalls.c:3228–3245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3226}
3227
3228int
3229kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg,
3230 struct timeval *tptr, enum uio_seg tptrseg)
3231{
3232 struct timespec ts[2];
3233 struct nameidata nd;
3234 int error;
3235
3236 if ((error = getutimes(tptr, tptrseg, ts)) != 0)
3237 return (error);
3238 NDINIT(&nd, LOOKUP, NOFOLLOW | AUDITVNODE1, pathseg, path, td);
3239 if ((error = namei(&nd)) != 0)
3240 return (error);
3241 NDFREE_NOTHING(&nd);
3242 error = setutimes(td, nd.ni_vp, ts, 2, tptr == NULL);
3243 vrele(nd.ni_vp);
3244 return (error);
3245}
3246
3247/*
3248 * Set the access and modification times of a file.

Callers 1

sys_lutimesFunction · 0.85

Calls 5

getutimesFunction · 0.85
nameiFunction · 0.85
NDFREE_NOTHINGFunction · 0.85
setutimesFunction · 0.85
vreleFunction · 0.70

Tested by

no test coverage detected