From owner-p4-projects@FreeBSD.ORG Wed May 3 22:42:02 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 169B416A41A; Wed, 3 May 2006 22:42:02 +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 9338C16A407 for ; Wed, 3 May 2006 22:42:00 +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 1612C43D46 for ; Wed, 3 May 2006 22:42:00 +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 k43Mfx9a009474 for ; Wed, 3 May 2006 22:41:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k43Mfxdj009466 for perforce@freebsd.org; Wed, 3 May 2006 22:41:59 GMT (envelope-from jb@freebsd.org) Date: Wed, 3 May 2006 22:41:59 GMT Message-Id: <200605032241.k43Mfxdj009466@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 96628 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: Wed, 03 May 2006 22:42:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=96628 Change 96628 by jb@jb_freebsd2 on 2006/05/03 22:41:39 More 'const' grief. It only takes one attempt to cast a char pointer to drop the 'const' to ruin an entire 'const' day. Declaring things 'const' is only worthwhile if you're going to obey them. In FreeBSD, the default kernel module compiler options detect the inconsistency in Sun's code. Sigh. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#19 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#5 edit .. //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#4 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#14 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#19 (text+ko) ==== @@ -246,7 +246,7 @@ static dtrace_pops_t dtrace_provider_ops = { /* dtps_provide */ - (void (*)(void *, const dtrace_probedesc_t *))dtrace_nullop, + (void (*)(void *, dtrace_probedesc_t *))dtrace_nullop, /* dtps_provide_module */ (void (*)(void *, modctl_t *))dtrace_nullop, /* dtps_enable */ ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#5 (text+ko) ==== @@ -78,7 +78,7 @@ if (pops->dtps_provide == NULL) { ASSERT(pops->dtps_provide_module != NULL); provider->dtpv_pops.dtps_provide = - (void (*)(void *, const dtrace_probedesc_t *))dtrace_nullop; + (void (*)(void *, dtrace_probedesc_t *))dtrace_nullop; } if (pops->dtps_provide_module == NULL) { ==== //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#4 (text+ko) ==== @@ -78,7 +78,7 @@ static int systrace_unload(void); static void systrace_args(int, void *, u_int64_t *, int *); static void systrace_probe(u_int32_t, int, struct sysent *, void *); -static void systrace_provide(void *, const dtrace_probedesc_t *); +static void systrace_provide(void *, dtrace_probedesc_t *); static void systrace_destroy(void *, dtrace_id_t, void *); static void systrace_enable(void *, dtrace_id_t, void *); static void systrace_disable(void *, dtrace_id_t, void *); @@ -166,7 +166,7 @@ /*ARGSUSED*/ static void -systrace_provide(void *arg, const dtrace_probedesc_t *desc) +systrace_provide(void *arg, dtrace_probedesc_t *desc) { int i; ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#14 (text) ==== @@ -1995,7 +1995,7 @@ * routines. */ typedef struct dtrace_pops { - void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec); + void (*dtps_provide)(void *arg, dtrace_probedesc_t *spec); void (*dtps_provide_module)(void *arg, modctl_t *mp); void (*dtps_enable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg);