| 3226 | } |
| 3227 | |
| 3228 | int |
| 3229 | kern_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. |
no test coverage detected