Module Name: src Committed By: christos Date: Sat Mar 7 17:47:09 UTC 2015
Modified Files: src/external/cddl/osnet/dev/systrace: systrace.c Log Message: we have space for 2 more arguments so use it. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/systrace/systrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dev/systrace/systrace.c diff -u src/external/cddl/osnet/dev/systrace/systrace.c:1.5 src/external/cddl/osnet/dev/systrace/systrace.c:1.6 --- src/external/cddl/osnet/dev/systrace/systrace.c:1.5 Sat Mar 7 10:14:09 2015 +++ src/external/cddl/osnet/dev/systrace/systrace.c Sat Mar 7 12:47:09 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: systrace.c,v 1.5 2015/03/07 15:14:09 christos Exp $ */ +/* $NetBSD: systrace.c,v 1.6 2015/03/07 17:47:09 christos Exp $ */ /* * CDDL HEADER START @@ -139,17 +139,18 @@ systrace_probe(uint32_t id, register_t s const void *params, const register_t *ret, int error) { size_t n_args = 0; - uintptr_t uargs[SYS_MAXSYSARGS]; + uintptr_t uargs[SYS_MAXSYSARGS + 3]; memset(uargs, 0, sizeof(uargs)); - if (params) { + if (ret) { /* entry syscall, convert params */ systrace_args(sysnum, params, uargs, &n_args); } else { - /* return syscall, set values (XXX: errno?) */ + /* return syscall, set values and params: */ uargs[0] = ret[0]; uargs[1] = ret[1]; uargs[2] = error; + systrace_args(sysnum, params, uargs + 3, &n_args); } /* Process the probe using the converted argments. */ /* XXX: fix for more arguments! */