aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-21 00:47:03 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 19:40:30 -0500
commitfea478d4101a4285aa25c5bafaaf4cec35026fe0 (patch)
tree7435c6571c49ddd131f0d7f2799ca5817d2eec6f /fs/proc
parentac13ac6f4c6c0504d2c927862216f4e422a2c0b5 (diff)
sysctl: Add register_sysctl for normal sysctl users
The plan is to convert all callers of register_sysctl_table and register_sysctl_paths to register_sysctl. The interface to register_sysctl is enough nicer this should make the callers a bit more readable. Additionally after the conversion the 230 lines of backwards compatibility can be removed. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_sysctl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 05c393a5c53..8dc7f0e46e7 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -1228,6 +1228,23 @@ fail:
1228 return NULL; 1228 return NULL;
1229} 1229}
1230 1230
1231/**
1232 * register_sysctl - register a sysctl table
1233 * @path: The path to the directory the sysctl table is in.
1234 * @table: the table structure
1235 *
1236 * Register a sysctl table. @table should be a filled in ctl_table
1237 * array. A completely 0 filled entry terminates the table.
1238 *
1239 * See __register_sysctl_table for more details.
1240 */
1241struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table)
1242{
1243 return __register_sysctl_table(&sysctl_table_root.default_set,
1244 path, table);
1245}
1246EXPORT_SYMBOL(register_sysctl);
1247
1231static char *append_path(const char *path, char *pos, const char *name) 1248static char *append_path(const char *path, char *pos, const char *name)
1232{ 1249{
1233 int namelen; 1250 int namelen;