Page MenuHomeFreeBSD

D3586.diff
No OneTemporary

D3586.diff

Index: head/sys/kern/imgact_elf.c
===================================================================
--- head/sys/kern/imgact_elf.c
+++ head/sys/kern/imgact_elf.c
@@ -1902,11 +1902,6 @@
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 @@
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;
Index: head/sys/kern/kern_exec.c
===================================================================
--- head/sys/kern/kern_exec.c
+++ head/sys/kern/kern_exec.c
@@ -100,6 +100,11 @@
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);
Index: head/sys/sys/exec.h
===================================================================
--- head/sys/sys/exec.h
+++ head/sys/sys/exec.h
@@ -83,6 +83,8 @@
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

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 11:26 AM (11 m, 23 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31096877
Default Alt Text
D3586.diff (1 KB)

Event Timeline