Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Sep 2015 16:44:29 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287537 - in head/sys: kern sys
Message-ID:  <201509071644.t87GiTut040367@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Mon Sep  7 16:44:28 2015
New Revision: 287537
URL: https://svnweb.freebsd.org/changeset/base/287537

Log:
  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

Modified:
  head/sys/kern/imgact_elf.c
  head/sys/kern/kern_exec.c
  head/sys/sys/exec.h

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Mon Sep  7 14:01:18 2015	(r287536)
+++ head/sys/kern/imgact_elf.c	Mon Sep  7 16:44:28 2015	(r287537)
@@ -1902,11 +1902,6 @@ __elfN(note_procstat_proc)(void *arg, st
 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 sb
 	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;

Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c	Mon Sep  7 14:01:18 2015	(r287536)
+++ head/sys/kern/kern_exec.c	Mon Sep  7 16:44:28 2015	(r287537)
@@ -100,6 +100,11 @@ SDT_PROBE_DEFINE1(proc, kernel, , exec__
 
 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);

Modified: head/sys/sys/exec.h
==============================================================================
--- head/sys/sys/exec.h	Mon Sep  7 14:01:18 2015	(r287536)
+++ head/sys/sys/exec.h	Mon Sep  7 16:44:28 2015	(r287537)
@@ -83,6 +83,8 @@ void exec_unmap_first_page(struct image_
 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509071644.t87GiTut040367>