Follow-up to r287442: Move sysctl to compiled-once file
Avoid duplicate sysctl nodes. Found by: tijl Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3586
This commit is contained in:
parent
12bee90fcf
commit
a8fae65d69
@ -1902,11 +1902,6 @@ __elfN(note_procstat_proc)(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
CTASSERT(sizeof(struct kinfo_file) == KINFO_FILE_SIZE);
|
||||
#endif
|
||||
|
||||
static int pack_fileinfo = 1;
|
||||
SYSCTL_INT(_kern, OID_AUTO, coredump_pack_fileinfo, CTLFLAG_RWTUN,
|
||||
&pack_fileinfo, 0,
|
||||
"Enable file path packing in 'procstat -f' coredump notes");
|
||||
|
||||
static void
|
||||
note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
{
|
||||
@ -1915,7 +1910,7 @@ note_procstat_files(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
ssize_t start_len, sect_len;
|
||||
int structsize, filedesc_flags;
|
||||
|
||||
if (pack_fileinfo)
|
||||
if (coredump_pack_fileinfo)
|
||||
filedesc_flags = KERN_FILEDESC_PACK_KINFO;
|
||||
else
|
||||
filedesc_flags = 0;
|
||||
|
@ -100,6 +100,11 @@ SDT_PROBE_DEFINE1(proc, kernel, , exec__success, "char *");
|
||||
|
||||
MALLOC_DEFINE(M_PARGS, "proc-args", "Process arguments");
|
||||
|
||||
int coredump_pack_fileinfo = 1;
|
||||
SYSCTL_INT(_kern, OID_AUTO, coredump_pack_fileinfo, CTLFLAG_RWTUN,
|
||||
&coredump_pack_fileinfo, 0,
|
||||
"Enable file path packing in 'procstat -f' coredump notes");
|
||||
|
||||
static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS);
|
||||
static int sysctl_kern_usrstack(SYSCTL_HANDLER_ARGS);
|
||||
static int sysctl_kern_stackprot(SYSCTL_HANDLER_ARGS);
|
||||
|
@ -83,6 +83,8 @@ void exec_unmap_first_page(struct image_params *);
|
||||
int exec_register(const struct execsw *);
|
||||
int exec_unregister(const struct execsw *);
|
||||
|
||||
extern int coredump_pack_fileinfo;
|
||||
|
||||
/*
|
||||
* note: name##_mod cannot be const storage because the
|
||||
* linker_file_sysinit() function modifies _file in the
|
||||
|
Loading…
x
Reference in New Issue
Block a user