Lines Matching full:tv
83 struct timespec64 tv;
86 if (get_user(tv.tv_sec, tptr))
89 tv.tv_nsec = 0;
91 err = security_settime64(&tv, NULL);
95 do_settimeofday64(&tv);
121 struct timespec64 tv;
124 if (get_user(tv.tv_sec, tptr))
127 tv.tv_nsec = 0;
129 err = security_settime64(&tv, NULL);
133 do_settimeofday64(&tv);
140 SYSCALL_DEFINE2(gettimeofday, struct __kernel_old_timeval __user *, tv,
143 if (likely(tv != NULL)) {
147 if (put_user(ts.tv_sec, &tv->tv_sec) ||
148 put_user(ts.tv_nsec / 1000, &tv->tv_usec))
169 int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
174 if (tv && !timespec64_valid_settod(tv))
177 error = security_settime64(tv, tz);
190 if (!tv)
194 if (tv)
195 return do_settimeofday64(tv);
199 SYSCALL_DEFINE2(settimeofday, struct __kernel_old_timeval __user *, tv,
205 if (tv) {
206 if (get_user(new_ts.tv_sec, &tv->tv_sec) ||
207 get_user(new_ts.tv_nsec, &tv->tv_usec))
220 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
224 COMPAT_SYSCALL_DEFINE2(gettimeofday, struct old_timeval32 __user *, tv,
227 if (tv) {
231 if (put_user(ts.tv_sec, &tv->tv_sec) ||
232 put_user(ts.tv_nsec / 1000, &tv->tv_usec))
243 COMPAT_SYSCALL_DEFINE2(settimeofday, struct old_timeval32 __user *, tv,
249 if (tv) {
250 if (get_user(new_ts.tv_sec, &tv->tv_sec) ||
251 get_user(new_ts.tv_nsec, &tv->tv_usec))
264 return do_sys_settimeofday64(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
473 struct __kernel_old_timeval tv;
475 tv.tv_sec = ts.tv_sec;
476 tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000;
478 return tv;