Load the dtraceall module if /dev/dtrace/dtrace doesn't exist.
MFC after: 3 days
This commit is contained in:
parent
1df885c863
commit
f6ddb56a60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254197
@ -1086,7 +1086,17 @@ dt_vopen(int version, int flags, int *errp,
|
|||||||
|
|
||||||
dtfd = open("/dev/dtrace/dtrace", O_RDWR);
|
dtfd = open("/dev/dtrace/dtrace", O_RDWR);
|
||||||
err = errno; /* save errno from opening dtfd */
|
err = errno; /* save errno from opening dtfd */
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
/*
|
||||||
|
* Automatically load the 'dtraceall' module if we couldn't open the
|
||||||
|
* char device.
|
||||||
|
*/
|
||||||
|
if (err == ENOENT && modfind("dtraceall") < 0) {
|
||||||
|
kldload("dtraceall"); /* ignore the error */
|
||||||
|
dtfd = open("/dev/dtrace/dtrace", O_RDWR);
|
||||||
|
err = errno;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if defined(sun)
|
#if defined(sun)
|
||||||
ftfd = open("/dev/dtrace/provider/fasttrap", O_RDWR);
|
ftfd = open("/dev/dtrace/provider/fasttrap", O_RDWR);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user