kernel/acct: move acct sysctls to its own file
[sfrench/cifs-2.6.git] / kernel / acct.c
index 3df53cf1dcd5ed08a72c68bd407b35b56513a75f..13706356ec54d4386eb37d563e3a13d769da63e0 100644 (file)
  * Turned into sysctl-controllable parameters. AV, 12/11/98
  */
 
-int acct_parm[3] = {4, 2, 30};
+static int acct_parm[3] = {4, 2, 30};
 #define RESUME         (acct_parm[0])  /* >foo% free space - resume */
 #define SUSPEND                (acct_parm[1])  /* <foo% free space - suspend */
 #define ACCT_TIMEOUT   (acct_parm[2])  /* foo second timeout between checks */
 
+#ifdef CONFIG_SYSCTL
+static struct ctl_table kern_acct_table[] = {
+       {
+               .procname       = "acct",
+               .data           = &acct_parm,
+               .maxlen         = 3*sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+       { }
+};
+
+static __init int kernel_acct_sysctls_init(void)
+{
+       register_sysctl_init("kernel", kern_acct_table);
+       return 0;
+}
+late_initcall(kernel_acct_sysctls_init);
+#endif /* CONFIG_SYSCTL */
+
 /*
  * External references and all of the globals.
  */