Module Name:    src
Committed By:   christos
Date:           Mon Oct  5 17:48:09 UTC 2015

Modified Files:
        src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c

Log Message:
load the kernel for NetBSD (for now)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
    src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.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/dist/lib/libdtrace/common/dt_module.c
diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.10 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.11
--- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.10	Sun Oct  4 19:25:32 2015
+++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c	Mon Oct  5 13:48:09 2015
@@ -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 @@ dt_module_getctflib(dtrace_hdl_t *dtp, d
  * 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_module_update(dtrace_hdl_t *dtp, stru
 	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 @@ dtrace_update(dtrace_hdl_t *dtp)
 		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
 
 	/*

Reply via email to