Deleted Added
full compact
dtrace_ioctl.c (179237) dtrace_ioctl.c (184698)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 4 unchanged lines hidden (view full) ---

13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 *
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 4 unchanged lines hidden (view full) ---

13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 *
21 * $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_ioctl.c 179237 2008-05-23 05:59:42Z jb $
21 * $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_ioctl.c 184698 2008-11-05 19:39:11Z rodrigc $
22 *
23 */
24
25static int dtrace_verbose_ioctl;
26SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, &dtrace_verbose_ioctl, 0, "");
27
28#define DTRACE_IOCTL_PRINTF(fmt, ...) if (dtrace_verbose_ioctl) printf(fmt, ## __VA_ARGS__ )
29
30/* ARGSUSED */
31static int
32dtrace_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
33 int flags __unused, struct thread *td)
34{
22 *
23 */
24
25static int dtrace_verbose_ioctl;
26SYSCTL_INT(_debug_dtrace, OID_AUTO, verbose_ioctl, CTLFLAG_RW, &dtrace_verbose_ioctl, 0, "");
27
28#define DTRACE_IOCTL_PRINTF(fmt, ...) if (dtrace_verbose_ioctl) printf(fmt, ## __VA_ARGS__ )
29
30/* ARGSUSED */
31static int
32dtrace_ioctl(struct cdev *dev, u_long cmd, caddr_t addr,
33 int flags __unused, struct thread *td)
34{
35#if __FreeBSD_version < 800039
35 dtrace_state_t *state = dev->si_drv1;
36 dtrace_state_t *state = dev->si_drv1;
37#else
38 dtrace_state_t *state;
39 devfs_get_cdevpriv((void **) &state);
40#endif
36 int error = 0;
37 if (state == NULL)
38 return (EINVAL);
39
40 if (state->dts_anon) {
41 ASSERT(dtrace_anon.dta_state == NULL);
42 state = state->dts_anon;
43 }

--- 734 unchanged lines hidden ---
41 int error = 0;
42 if (state == NULL)
43 return (EINVAL);
44
45 if (state->dts_anon) {
46 ASSERT(dtrace_anon.dta_state == NULL);
47 state = state->dts_anon;
48 }

--- 734 unchanged lines hidden ---