From owner-p4-projects@FreeBSD.ORG Sat Apr 29 02:16:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC2F416A403; Sat, 29 Apr 2006 02:16:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 723E716A400 for ; Sat, 29 Apr 2006 02:16:11 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9BB843D45 for ; Sat, 29 Apr 2006 02:16:10 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3T2GAZT053978 for ; Sat, 29 Apr 2006 02:16:10 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3T2GAre053975 for perforce@freebsd.org; Sat, 29 Apr 2006 02:16:10 GMT (envelope-from jb@freebsd.org) Date: Sat, 29 Apr 2006 02:16:10 GMT Message-Id: <200604290216.k3T2GAre053975@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 96348 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 02:16:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=96348 Change 96348 by jb@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: