Skip to contentSkip to conversation

sysctl extern cleanup - binfmts

PATCH In review Dave Young 1 participant 1 message Feb 20, 2010

Subsystems (2)
lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 4/18 sysctl extern cleanup - binfmts

Extern declarations in sysctl.c should be move to their own head file, and then include them in relavant .c files.

Move core_uses_pid/core_pattern/core_pipe_limit extern declarations to linux/binfmts.h
suid_dumpable is declared in binfmts.h already.

---
 include/linux/binfmts.h |    6 ++++++
 kernel/sysctl.c         |    5 +----
 2 files changed, 7 insertions(+), 4 deletions(-)
kernel/sysctl.c +1 -4
@@ -56,6 +56,7 @@
 #include <linux/rcustring.h>
 #include <linux/signal.h>
 #include <linux/threads.h>
+#include <linux/binfmts.h>
 
 #include <asm/uaccess.h>
 #include <asm/processor.h>
@@ -70,10 +71,6 @@
 #if defined(CONFIG_SYSCTL)
 
 /* External variables not in a header file. */
-extern int core_uses_pid;
-extern int suid_dumpable;
-extern char *core_pattern;
-extern unsigned int core_pipe_limit;
 extern int pid_max;
 extern int min_free_kbytes;
 extern int pid_max_min, pid_max_max;
include/linux/binfmts.h +6 -0
@@ -20,6 +20,12 @@ struct pt_regs;
 #ifdef __KERNEL__
 #include <linux/list.h>
 
+#ifdef CONFIG_SYSCTL
+extern int core_uses_pid;
+extern char *core_pattern;
+extern unsigned int core_pipe_limit;
+#endif
+
 #define CORENAME_MAX_SIZE 128
 
 /*