From 3b64c0d65d4df58a44bc970ef2655f3c2c9ed27d Mon Sep 17 00:00:00 2001 From: aaron Date: Mon, 6 Dec 1999 19:36:41 +0000 Subject: Implement compatibility for Linux stime() syscall. --- sys/compat/linux/linux_misc.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_misc.c') 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; +} -- cgit v1.2.3-59-g8ed1b