diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-12-06 19:36:43 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 1999-12-06 19:36:43 +0000 |
commit | 6c6cf8c2c8b69ed55cebe1d3820528494e23d8a4 (patch) | |
tree | 0255915141b08e565ceab53c1b13cf19eef01158 /sys/compat | |
parent | ff9786e59173fb99cfffada46ea0e4e7890137f1 (diff) |
Implement compatibility for Linux stime() syscall.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 29 | ||||
-rw-r--r-- | sys/compat/linux/syscalls.master | 4 |
2 files changed, 30 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 97ebc30aed5..599be904272 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.24 1999/06/14 06:47:54 deraadt Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.25 1999/12/06 19:36:41 aaron Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /* @@ -1255,3 +1255,30 @@ linux_sys_nice(p, v, retval) SCARG(&bsa, prio) = SCARG(uap, incr); return sys_setpriority(p, &bsa, retval); } + +int +linux_sys_stime(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct linux_sys_time_args /* { + linux_time_t *t; + } */ *uap = v; + struct timeval atv; + linux_time_t tt; + int error; + + if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + return (error); + + if ((error = copyin(SCARG(uap, t), &tt, sizeof(tt))) != 0) + return (error); + + atv.tv_sec = tt; + atv.tv_usec = 0; + + settime(&atv); + + return 0; +} diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master index 0c7ed5adc08..a39816ed466 100644 --- a/sys/compat/linux/syscalls.master +++ b/sys/compat/linux/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.13 1997/12/10 11:55:28 deraadt Exp $ + $OpenBSD: syscalls.master,v 1.14 1999/12/06 19:36:42 aaron Exp $ ; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -73,7 +73,7 @@ 22 STD { int linux_sys_umount(char *specialfile); } 23 NOARGS { int sys_setuid(uid_t uid); } 24 NOARGS { uid_t sys_getuid(void); } -25 UNIMPL stime +25 STD { int linux_sys_stime(linux_time_t *t); } 26 UNIMPL ptrace 27 STD { int linux_sys_alarm(unsigned int secs); } 28 OBSOL ofstat |