2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * In Solaris 10 GA, the only mechanism for communicating helper information 2N/A * is through the DTrace helper pseudo-device node in /devices; there is 2N/A * no /dev link. Because of this, USDT providers and helper actions don't 2N/A * work inside of non-global zones. This issue was addressed by adding 2N/A * the /dev and having this initialization code use that /dev link. If the 2N/A * /dev link doesn't exist it falls back to looking for the /devices node 2N/A * as this code may be embedded in a binary which runs on Solaris 10 GA. 2N/A * Users may set the following environment variable to affect the way 2N/A * helper initialization takes place: 2N/A * DTRACE_DOF_INIT_DEBUG enable debugging output 2N/A * DTRACE_DOF_INIT_DISABLE disable helper loading 2N/A * DTRACE_DOF_INIT_DEVNAME set the path to the helper node 2N/Astatic const char *
modname;
/* Name of this load object */ 2N/Astatic int gen;
/* DOF helper generation */ 2N/A dprintf(
1,
"couldn't discover module name or address\n");
2N/A * If the device path wasn't explicitly set, try again with 2N/A * the old device path.