Implement settimeofday() for Linuxulator/amd64.
Submitted by: Scot Hetzel (swhetzel at gmail dot com)
This commit is contained in:
parent
67f759b3f5
commit
86a0e5dbb6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168843
@ -64,7 +64,6 @@ DUMMY(pivot_root);
|
||||
DUMMY(mincore);
|
||||
DUMMY(fadvise64);
|
||||
DUMMY(ptrace);
|
||||
DUMMY(settimeofday);
|
||||
DUMMY(lookup_dcookie);
|
||||
DUMMY(epoll_create);
|
||||
DUMMY(epoll_ctl);
|
||||
|
@ -1177,6 +1177,33 @@ linux_gettimeofday(struct thread *td, struct linux_gettimeofday_args *uap)
|
||||
return (error);
|
||||
}
|
||||
|
||||
int
|
||||
linux_settimeofday(struct thread *td, struct linux_settimeofday_args *uap)
|
||||
{
|
||||
l_timeval atv32;
|
||||
struct timeval atv, *tvp;
|
||||
struct timezone atz, *tzp;
|
||||
int error;
|
||||
|
||||
if (uap->tp) {
|
||||
error = copyin(uap->tp, &atv32, sizeof(atv32));
|
||||
if (error)
|
||||
return (error);
|
||||
atv.tv_sec = atv32.tv_sec;
|
||||
atv.tv_usec = atv32.tv_usec;
|
||||
tvp = &atv;
|
||||
} else
|
||||
tvp = NULL;
|
||||
if (uap->tzp) {
|
||||
error = copyin(uap->tzp, &atz, sizeof(atz));
|
||||
if (error)
|
||||
return (error);
|
||||
tzp = &atz;
|
||||
} else
|
||||
tzp = NULL;
|
||||
return (kern_settimeofday(td, tvp, tzp));
|
||||
}
|
||||
|
||||
int
|
||||
linux_getrusage(struct thread *td, struct linux_getrusage_args *uap)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user