diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-06-01 16:27:38 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-06-01 16:27:38 +0000 |
commit | 39052196d44a25242d28845774b70928131837bb (patch) | |
tree | f379196a5202e9e7959c90438a6d674fdb93c109 | |
parent | aedbb718fa5c0cf868beadc84888f716aa40a518 (diff) |
always implement stub utrace syscall, but keep the body #ifdef KTRACE
ok guenther matthew
-rw-r--r-- | sys/kern/kern_ktrace.c | 18 | ||||
-rw-r--r-- | sys/kern/sys_generic.c | 22 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 6 |
3 files changed, 23 insertions, 23 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index dc268aa8d5a..7eb25f0498a 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.59 2013/06/01 09:49:50 miod Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.60 2013/06/01 16:27:37 tedu Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -648,19 +648,3 @@ ktrcanset(struct proc *callp, struct process *targetpr) return (0); } - -/* - * utrace system call - */ -/* ARGSUSED */ -int -sys_utrace(struct proc *curp, void *v, register_t *retval) -{ - struct sys_utrace_args /* { - syscallarg(const char *) label; - syscallarg(const void *) addr; - syscallarg(size_t) len; - } */ *uap = v; - return (ktruser(curp, SCARG(uap, label), SCARG(uap, addr), - SCARG(uap, len))); -} diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index d4176b47fd4..14e8a562fd8 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.80 2013/05/19 19:14:44 guenther Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.81 2013/06/01 16:27:37 tedu Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -1019,3 +1019,23 @@ bad: free(pl, M_TEMP); return (error); } + +/* + * utrace system call + */ +/* ARGSUSED */ +int +sys_utrace(struct proc *curp, void *v, register_t *retval) +{ +#ifdef KTRACE + struct sys_utrace_args /* { + syscallarg(const char *) label; + syscallarg(const void *) addr; + syscallarg(size_t) len; + } */ *uap = v; + return (ktruser(curp, SCARG(uap, label), SCARG(uap, addr), + SCARG(uap, len))); +#else + return (0); +#endif +} diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 8cdbd016b9b..2c5717d0c48 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.131 2013/06/01 09:49:50 miod Exp $ +; $OpenBSD: syscalls.master,v 1.132 2013/06/01 16:27:37 tedu Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -343,12 +343,8 @@ const struct timeval *tptr); } 207 STD { pid_t sys_getpgid(pid_t pid); } 208 OBSOL nnpfspioctl -#ifdef KTRACE 209 STD { int sys_utrace(const char *label, const void *addr, \ size_t len); } -#else -209 UNIMPL -#endif ; ; Syscalls 210-219 are reserved for dynamically loaded syscalls ; |