summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2009-11-05 05:26:41 -0800
committerEric W. Biederman <ebiederm@xmission.com>2009-11-11 00:42:05 -0800
commit26a7034b40ba80f82f64fa251a2cbf49f9971c6a (patch)
treeb2f72e19e51d04c6f18398ca08f8b2e8519ee65e /init
parent642c6d946b5cdc27d0146c41dc20b7c4d4c3ccd8 (diff)
downloadlinux-exynos-26a7034b40ba80f82f64fa251a2cbf49f9971c6a.tar.gz
linux-exynos-26a7034b40ba80f82f64fa251a2cbf49f9971c6a.tar.bz2
linux-exynos-26a7034b40ba80f82f64fa251a2cbf49f9971c6a.zip
sysctl: Reduce sys_sysctl to a compatibility wrapper around /proc/sys
To simply maintenance and to be able to remove all of the binary sysctl support from various subsystems I have rewritten the binary sysctl code as a compatibility wrapper around proc/sys. The code is built around a hard coded table based on the table in sysctl_check.c that lists all of our current binary sysctls and provides enough information to convert from the sysctl binary input into into ascii and back again. New in this patch is the realization that the only dynamic entries that need to be handled have ifname as the asscii string and ifindex as their ctl_name. When a sys_sysctl is called the code now looks in the translation table converting the binary name to the path under /proc where the value is to be found. Opens that file, and calls into a format conversion wrapper that calls fop->read and then fop->write as appropriate. Since in practice the practically no one uses or tests sys_sysctl rewritting the code to be beautiful is a little silly. The redeeming merit of this work is it allows us to rip out all of the binary sysctl syscall support from everywhere else in the tree. Allowing us to remove a lot of dead (after this patch) and barely maintained code. In addition it becomes much easier to optimize the sysctl implementation for being the backing store of /proc/sys, without having to worry about sys_sysctl. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f51586406d62..feb3b8f7e7ee 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -754,6 +754,7 @@ config UID16
config SYSCTL_SYSCALL
bool "Sysctl syscall support" if EMBEDDED
+ depends on PROC_SYSCTL
default y
select SYSCTL
---help---