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

Function kern_futimes

freebsd/kern/vfs_syscalls.c:3263–3286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3261}
3262
3263int
3264kern_futimes(struct thread *td, int fd, struct timeval *tptr,
3265 enum uio_seg tptrseg)
3266{
3267 struct timespec ts[2];
3268 struct file *fp;
3269 int error;
3270
3271 AUDIT_ARG_FD(fd);
3272 error = getutimes(tptr, tptrseg, ts);
3273 if (error != 0)
3274 return (error);
3275 error = getvnode(td, fd, &cap_futimes_rights, &fp);
3276 if (error != 0)
3277 return (error);
3278#ifdef AUDIT
3279 vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY);
3280 AUDIT_ARG_VNODE1(fp->f_vnode);
3281 VOP_UNLOCK(fp->f_vnode);
3282#endif
3283 error = setutimes(td, fp->f_vnode, ts, 2, tptr == NULL);
3284 fdrop(fp, td);
3285 return (error);
3286}
3287
3288int
3289sys_futimens(struct thread *td, struct futimens_args *uap)

Callers 1

sys_futimesFunction · 0.85

Calls 4

getutimesFunction · 0.85
getvnodeFunction · 0.85
vn_lockFunction · 0.85
setutimesFunction · 0.85

Tested by

no test coverage detected