PERFORCE change 96348 for review
John Birrell
jb at FreeBSD.org
Sat Apr 29 02:16:11 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96348
Change 96348 by jb at jb_freebsd2 on 2006/04/29 02:15:29
Change the way the unload works. If we reject the unload while there
are providers and leave the module loaded, we want to keep the event
callback registered.
Affected files ...
.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#6 edit
Differences ...
==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#6 (text+ko) ====
@@ -30,7 +30,7 @@
switch (type) {
case MOD_LOAD:
- printf("--------------------------------------------------------\n");
+ printf("dtrace -------------------------------------------------\n");
if ((error = dtrace_load()) == 0) {
/* Enable device cloning. */
clone_setup(&dtrace_clones);
@@ -41,6 +41,9 @@
break;
case MOD_UNLOAD:
+ if ((error = dtrace_unload()) != 0)
+ return (error);
+
/*
* Check if there is still an event handler callback
* registered.
@@ -53,9 +56,6 @@
/* Stop device cloning. */
clone_cleanup(&dtrace_clones);
}
-
- error = dtrace_unload();
-if (error != 0) printf("dtrace_modevent: error %d\n",error);
break;
case MOD_SHUTDOWN:
More information about the p4-projects
mailing list