mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
ktr: Make debug.ktr.verbose available whenever KTR is configured
This is more useful and matches the documentation. While here, make it settable as a tunable and add a sysctl description. PR: 139425 MFC after: 2 weeks
This commit is contained in:
parent
d35c4cfad5
commit
c5773d366e
1 changed files with 5 additions and 4 deletions
|
|
@ -251,9 +251,12 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, entries,
|
|||
|
||||
#ifdef KTR_VERBOSE
|
||||
int ktr_verbose = KTR_VERBOSE;
|
||||
TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
|
||||
SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, "");
|
||||
#else
|
||||
int ktr_verbose = 0;
|
||||
#endif
|
||||
TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
|
||||
SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RWTUN, &ktr_verbose, 0,
|
||||
"Print extra info when logging to the console");
|
||||
|
||||
#ifdef KTR_ALQ
|
||||
struct alq *ktr_alq;
|
||||
|
|
@ -375,7 +378,6 @@ ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format,
|
|||
file += 3;
|
||||
entry->ktr_file = file;
|
||||
entry->ktr_line = line;
|
||||
#ifdef KTR_VERBOSE
|
||||
if (ktr_verbose) {
|
||||
#ifdef SMP
|
||||
printf("cpu%d ", cpu);
|
||||
|
|
@ -387,7 +389,6 @@ ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format,
|
|||
printf(format, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
entry->ktr_desc = format;
|
||||
entry->ktr_parms[0] = arg1;
|
||||
entry->ktr_parms[1] = arg2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue