Lines Matching refs:times

24 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times)  in SYSCALL_DEFINE2()  argument
28 if (times) { in SYSCALL_DEFINE2()
29 if (get_user(tv[0].tv_sec, &times->actime) || in SYSCALL_DEFINE2()
30 get_user(tv[1].tv_sec, &times->modtime)) in SYSCALL_DEFINE2()
35 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0); in SYSCALL_DEFINE2()
48 static int utimes_common(const struct path *path, struct timespec64 *times) in utimes_common() argument
59 if (times && times[0].tv_nsec == UTIME_NOW && in utimes_common()
60 times[1].tv_nsec == UTIME_NOW) in utimes_common()
61 times = NULL; in utimes_common()
64 if (times) { in utimes_common()
65 if (times[0].tv_nsec == UTIME_OMIT) in utimes_common()
67 else if (times[0].tv_nsec != UTIME_NOW) { in utimes_common()
68 newattrs.ia_atime.tv_sec = times[0].tv_sec; in utimes_common()
69 newattrs.ia_atime.tv_nsec = times[0].tv_nsec; in utimes_common()
73 if (times[1].tv_nsec == UTIME_OMIT) in utimes_common()
75 else if (times[1].tv_nsec != UTIME_NOW) { in utimes_common()
76 newattrs.ia_mtime.tv_sec = times[1].tv_sec; in utimes_common()
77 newattrs.ia_mtime.tv_nsec = times[1].tv_nsec; in utimes_common()
119 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument
124 if (times && (!nsec_valid(times[0].tv_nsec) || in do_utimes()
125 !nsec_valid(times[1].tv_nsec))) { in do_utimes()
143 error = utimes_common(&f.file->f_path, times); in do_utimes()
156 error = utimes_common(&path, times); in do_utimes()
190 struct timeval times[2]; in do_futimesat() local
194 if (copy_from_user(&times, utimes, sizeof(times))) in do_futimesat()
202 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 || in do_futimesat()
203 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0) in do_futimesat()
206 tstimes[0].tv_sec = times[0].tv_sec; in do_futimesat()
207 tstimes[0].tv_nsec = 1000 * times[0].tv_usec; in do_futimesat()
208 tstimes[1].tv_sec = times[1].tv_sec; in do_futimesat()
209 tstimes[1].tv_nsec = 1000 * times[1].tv_usec; in do_futimesat()