Rename dprintf into dbg_printf to avoid collision with dprintf(3)
When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added. This rename is made in preparation for the removal of this guard
This commit is contained in:
parent
a05f81bfa3
commit
25fac4a635
@ -65,7 +65,7 @@ extern dof_hdr_t __SUNW_dof; /* DOF defined in the .SUNW_dof section */
|
||||
static boolean_t dof_init_debug = B_FALSE; /* From DTRACE_DOF_INIT_DEBUG */
|
||||
|
||||
static void
|
||||
dprintf(int debug, const char *fmt, ...)
|
||||
dbg_printf(int debug, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@ -119,13 +119,13 @@ dtrace_dof_init(void)
|
||||
dof_init_debug = B_TRUE;
|
||||
|
||||
if (dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lmp) == -1 || lmp == NULL) {
|
||||
dprintf(1, "couldn't discover module name or address\n");
|
||||
dbg_printf(1, "couldn't discover module name or address\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef illumos
|
||||
if (dlinfo(RTLD_SELF, RTLD_DI_LMID, &lmid) == -1) {
|
||||
dprintf(1, "couldn't discover link map ID\n");
|
||||
dbg_printf(1, "couldn't discover link map ID\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@ -139,7 +139,7 @@ dtrace_dof_init(void)
|
||||
dof->dofh_ident[DOF_ID_MAG1] != DOF_MAG_MAG1 ||
|
||||
dof->dofh_ident[DOF_ID_MAG2] != DOF_MAG_MAG2 ||
|
||||
dof->dofh_ident[DOF_ID_MAG3] != DOF_MAG_MAG3) {
|
||||
dprintf(0, ".SUNW_dof section corrupt\n");
|
||||
dbg_printf(0, ".SUNW_dof section corrupt\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ dtrace_dof_init(void)
|
||||
devnamep = p;
|
||||
|
||||
if ((fd = open64(devnamep, O_RDWR)) < 0) {
|
||||
dprintf(1, "failed to open helper device %s", devnamep);
|
||||
dbg_printf(1, "failed to open helper device %s", devnamep);
|
||||
#ifdef illumos
|
||||
/*
|
||||
* If the device path wasn't explicitly set, try again with
|
||||
@ -175,7 +175,7 @@ dtrace_dof_init(void)
|
||||
devnamep = olddevname;
|
||||
|
||||
if ((fd = open64(devnamep, O_RDWR)) < 0) {
|
||||
dprintf(1, "failed to open helper device %s", devnamep);
|
||||
dbg_printf(1, "failed to open helper device %s", devnamep);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
@ -183,9 +183,9 @@ dtrace_dof_init(void)
|
||||
#endif
|
||||
}
|
||||
if ((gen = ioctl(fd, DTRACEHIOC_ADDDOF, &dh)) == -1)
|
||||
dprintf(1, "DTrace ioctl failed for DOF at %p", dof);
|
||||
dbg_printf(1, "DTrace ioctl failed for DOF at %p", dof);
|
||||
else {
|
||||
dprintf(1, "DTrace ioctl succeeded for DOF at %p\n", dof);
|
||||
dbg_printf(1, "DTrace ioctl succeeded for DOF at %p\n", dof);
|
||||
#ifdef __FreeBSD__
|
||||
gen = dh.dofhp_gen;
|
||||
#endif
|
||||
@ -206,14 +206,14 @@ dtrace_dof_fini(void)
|
||||
int fd;
|
||||
|
||||
if ((fd = open64(devnamep, O_RDWR)) < 0) {
|
||||
dprintf(1, "failed to open helper device %s", devnamep);
|
||||
dbg_printf(1, "failed to open helper device %s", devnamep);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gen = ioctl(fd, DTRACEHIOC_REMOVE, &gen)) == -1)
|
||||
dprintf(1, "DTrace ioctl failed to remove DOF (%d)\n", gen);
|
||||
dbg_printf(1, "DTrace ioctl failed to remove DOF (%d)\n", gen);
|
||||
else
|
||||
dprintf(1, "DTrace ioctl removed DOF (%d)\n", gen);
|
||||
dbg_printf(1, "DTrace ioctl removed DOF (%d)\n", gen);
|
||||
|
||||
(void) close(fd);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user