Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dist/lib/libdtrace/common load the kerne...



details:   https://anonhg.NetBSD.org/src/rev/3d7b9342972a
branches:  trunk
changeset: 340846:3d7b9342972a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 05 17:48:09 2015 +0000

description:
load the kernel for NetBSD (for now)

diffstat:

 external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 700e14a31bf1 -r 3d7b9342972a external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Mon Oct 05 17:47:37 2015 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Mon Oct 05 17:48:09 2015 +0000
@@ -40,6 +40,9 @@
 #include <sys/module.h>
 #include <sys/stat.h>
 #endif
+#ifdef __NetBSD__
+#include <sys/sysctl.h>
+#endif
 
 #include <unistd.h>
 #ifdef illumos
@@ -1131,9 +1134,8 @@
  * On FreeBSD, the module name is passed as the full module file name, 
  * including the path.
  */
-#ifndef __NetBSD__
 static void
-#ifdef illumos
+#if defined(illumos) || defined(__NetBSD__)
 dt_module_update(dtrace_hdl_t *dtp, const char *name)
 #elif defined(__FreeBSD__)
 dt_module_update(dtrace_hdl_t *dtp, struct kld_file_stat *k_stat)
@@ -1354,7 +1356,6 @@
        dt_dprintf("opened %d-bit module %s (%s) [%d]\n",
            bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid);
 }
-#endif
 
 /*
  * Unload all the loaded modules and then refresh the module cache with the
@@ -1401,6 +1402,9 @@
                if (kldstat(fileid, &k_stat) == 0)
                        dt_module_update(dtp, &k_stat);
        }
+#elif defined(__NetBSD__)
+       /* XXX just the kernel for now */
+       dt_module_update(dtp, "netbsd");
 #endif
 
        /*



Home | Main Index | Thread Index | Old Index