Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/filemon Install wrapper functions only in native emu...



details:   https://anonhg.NetBSD.org/src/rev/ac5e089a95c6
branches:  trunk
changeset: 811866:ac5e089a95c6
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Nov 20 01:16:04 2015 +0000

description:
Install wrapper functions only in native emulation.

(This also removes the dependency on curproc, which may not be available
at the time that built-in kernel modules are initialized.)

diffstat:

 sys/dev/filemon/filemon_wrapper.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r fdd633d242b8 -r ac5e089a95c6 sys/dev/filemon/filemon_wrapper.c
--- a/sys/dev/filemon/filemon_wrapper.c Fri Nov 20 01:12:38 2015 +0000
+++ b/sys/dev/filemon/filemon_wrapper.c Fri Nov 20 01:16:04 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filemon_wrapper.c,v 1.7 2015/06/15 19:45:31 christos Exp $     */
+/*     $NetBSD: filemon_wrapper.c,v 1.8 2015/11/20 01:16:04 pgoyette Exp $     */
 
 /*
  * Copyright (c) 2010, Juniper Networks, Inc.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filemon_wrapper.c,v 1.7 2015/06/15 19:45:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filemon_wrapper.c,v 1.8 2015/11/20 01:16:04 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -354,7 +354,7 @@
 void
 filemon_wrapper_install(void)
 {
-       struct sysent *sv_table = curproc->p_emul->e_sysent;
+       struct sysent *sv_table = emul_netbsd.e_sysent;
 
        sv_table[SYS_chdir].sy_call = (sy_call_t *) filemon_wrapper_chdir;
        sv_table[SYS_execve].sy_call = (sy_call_t *) filemon_wrapper_execve;
@@ -372,7 +372,7 @@
 int
 filemon_wrapper_deinstall(void)
 {
-       struct sysent *sv_table = curproc->p_emul->e_sysent;
+       struct sysent *sv_table = emul_netbsd.e_sysent;
 
        if (sv_table[SYS_chdir].sy_call != (sy_call_t *) filemon_wrapper_chdir)
            return EBUSY;



Home | Main Index | Thread Index | Old Index