From 0f97f46ae06e1a10c8dfb915adf4ba628d7e2aac Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 20 Jan 2012 21:47:03 -0800 Subject: [PATCH] --- yaml --- r: 295468 b: refs/heads/master c: fea478d4101a4285aa25c5bafaaf4cec35026fe0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/proc/proc_sysctl.c | 17 +++++++++++++++++ trunk/include/linux/sysctl.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c3a1a05fec65..9611d00eaf14 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ac13ac6f4c6c0504d2c927862216f4e422a2c0b5 +refs/heads/master: fea478d4101a4285aa25c5bafaaf4cec35026fe0 diff --git a/trunk/fs/proc/proc_sysctl.c b/trunk/fs/proc/proc_sysctl.c index 05c393a5c530..8dc7f0e46e7e 100644 --- a/trunk/fs/proc/proc_sysctl.c +++ b/trunk/fs/proc/proc_sysctl.c @@ -1228,6 +1228,23 @@ struct ctl_table_header *__register_sysctl_table( return NULL; } +/** + * register_sysctl - register a sysctl table + * @path: The path to the directory the sysctl table is in. + * @table: the table structure + * + * Register a sysctl table. @table should be a filled in ctl_table + * array. A completely 0 filled entry terminates the table. + * + * See __register_sysctl_table for more details. + */ +struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table) +{ + return __register_sysctl_table(&sysctl_table_root.default_set, + path, table); +} +EXPORT_SYMBOL(register_sysctl); + static char *append_path(const char *path, char *pos, const char *name) { int namelen; diff --git a/trunk/include/linux/sysctl.h b/trunk/include/linux/sysctl.h index 35c50ed36fc9..c34b4c82b0dc 100644 --- a/trunk/include/linux/sysctl.h +++ b/trunk/include/linux/sysctl.h @@ -1090,6 +1090,7 @@ struct ctl_table_header *__register_sysctl_table( struct ctl_table_header *__register_sysctl_paths( struct ctl_table_set *set, const struct ctl_path *path, struct ctl_table *table); +struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table); struct ctl_table_header *register_sysctl_table(struct ctl_table * table); struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, struct ctl_table *table);