diff options
author | jb <jb@FreeBSD.org> | 2008-04-26 00:54:52 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2008-04-26 00:54:52 +0000 |
commit | 52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50 (patch) | |
tree | c98db398653c7c531756a3578af91819cb574281 /cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c | |
parent | cb8ce777270daa16660da8e87ef6a11d5bc5408f (diff) | |
download | FreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.zip FreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.tar.gz |
Vendor import of the full userland contrib part of DTrace support from
OpenSolaris. This commit resets files to match the versions in the
OpenSolaris tree as of 2008/04/10.
The changes in this import from the previous import are the ones that
will subsequently re-applied to take files off the vendor branch. This
is unfortunately necessary because the Solaris developers won't allow
FreeBSD support #ifdefs in their source code because that creates
'dead code' (stuff that they never compile).
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c index fa1407f..5353bfa 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c @@ -35,9 +35,7 @@ #include <stdlib.h> #include <unistd.h> #include <limits.h> -#if defined(sun) #include <alloca.h> -#endif #include <errno.h> #include <fcntl.h> @@ -797,12 +795,7 @@ dt_options_load(dtrace_hdl_t *dtp) bzero(&hdr, sizeof (dof_hdr_t)); hdr.dofh_loadsz = sizeof (dof_hdr_t); -#if defined(sun) if (dt_ioctl(dtp, DTRACEIOC_DOFGET, &hdr) == -1) -#else - dof = &hdr; - if (dt_ioctl(dtp, DTRACEIOC_DOFGET, &dof) == -1) -#endif return (dt_set_errno(dtp, errno)); if (hdr.dofh_loadsz < sizeof (dof_hdr_t)) @@ -815,11 +808,7 @@ dt_options_load(dtrace_hdl_t *dtp) for (i = 0; i < DTRACEOPT_MAX; i++) dtp->dt_options[i] = DTRACEOPT_UNSET; -#if defined(sun) if (dt_ioctl(dtp, DTRACEIOC_DOFGET, dof) == -1) -#else - if (dt_ioctl(dtp, DTRACEIOC_DOFGET, &dof) == -1) -#endif return (dt_set_errno(dtp, errno)); for (i = 0; i < dof->dofh_secnum; i++) { @@ -923,7 +912,7 @@ static const dt_option_t _dtrace_ctoptions[] = { { "verbose", dt_opt_cflags, DTRACE_C_DIFV }, { "version", dt_opt_version }, { "zdefs", dt_opt_cflags, DTRACE_C_ZDEFS }, - { NULL, NULL, 0 } + { NULL } }; /* @@ -947,7 +936,7 @@ static const dt_option_t _dtrace_rtoptions[] = { { "statusrate", dt_opt_rate, DTRACEOPT_STATUSRATE }, { "strsize", dt_opt_strsize, DTRACEOPT_STRSIZE }, { "ustackframes", dt_opt_runtime, DTRACEOPT_USTACKFRAMES }, - { NULL, NULL, 0 } + { NULL } }; /* @@ -964,7 +953,7 @@ static const dt_option_t _dtrace_drtoptions[] = { { "rawbytes", dt_opt_runtime, DTRACEOPT_RAWBYTES }, { "stackindent", dt_opt_runtime, DTRACEOPT_STACKINDENT }, { "switchrate", dt_opt_rate, DTRACEOPT_SWITCHRATE }, - { NULL, NULL, 0 } + { NULL } }; int |