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

Function sys_settimeofday

freebsd/kern/kern_time.c:672–694  ·  view source on GitHub ↗

ARGSUSED */

Source from the content-addressed store, hash-verified

670#endif
671/* ARGSUSED */
672int
673sys_settimeofday(struct thread *td, struct settimeofday_args *uap)
674{
675 struct timeval atv, *tvp;
676 struct timezone atz, *tzp;
677 int error;
678
679 if (uap->tv) {
680 error = copyin(uap->tv, &atv, sizeof(atv));
681 if (error)
682 return (error);
683 tvp = &atv;
684 } else
685 tvp = NULL;
686 if (uap->tzp) {
687 error = copyin(uap->tzp, &atz, sizeof(atz));
688 if (error)
689 return (error);
690 tzp = &atz;
691 } else
692 tzp = NULL;
693 return (kern_settimeofday(td, tvp, tzp));
694}
695
696int
697kern_settimeofday(struct thread *td, struct timeval *tv, struct timezone *tzp)

Callers

nothing calls this directly

Calls 2

kern_settimeofdayFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected