Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154419250
D38892.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38892.diff
View Options
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
@@ -331,6 +331,7 @@
int dt_stdout_fd; /* file descriptor for saved stdout */
#else
FILE *dt_freopen_fp; /* file pointer for freopened stdout */
+ char bootfile[MAXPATHLEN]; /* kernel boot file */
#endif
dtrace_handle_err_f *dt_errhdlr; /* error handler, if any */
void *dt_errarg; /* error handler argument */
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
@@ -1311,19 +1311,18 @@
*/
#ifndef illumos
{
- char bootfile[MAXPATHLEN];
char *p;
int i;
- size_t len = sizeof(bootfile);
+ size_t len = sizeof(dtp->bootfile);
/* This call shouldn't fail, but use a default just in case. */
- if (sysctlbyname("kern.bootfile", bootfile, &len, NULL, 0) != 0)
- strlcpy(bootfile, "kernel", sizeof(bootfile));
+ if (sysctlbyname("kern.bootfile", dtp->bootfile, &len, NULL, 0) != 0)
+ strlcpy(dtp->bootfile, "/boot/kernel/kernel", sizeof(dtp->bootfile));
- if ((p = strrchr(bootfile, '/')) != NULL)
+ if ((p = strrchr(dtp->bootfile, '/')) != NULL)
p++;
else
- p = bootfile;
+ p = dtp->bootfile;
/*
* Format the global variables based on the kernel module name.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 10:38 AM (15 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32343843
Default Alt Text
D38892.diff (1 KB)
Attached To
Mode
D38892: libdtrace: embed kernel bootfile in dtrace_hdl_t
Attached
Detach File
Event Timeline
Log In to Comment