aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/proc_sysctl.c17
-rw-r--r--include/linux/sysctl.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 05c393a5c530..8dc7f0e46e7e 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;
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 35c50ed36fc9..c34b4c82b0dc 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1090,6 +1090,7 @@ struct ctl_table_header *__register_sysctl_table(
1090struct ctl_table_header *__register_sysctl_paths( 1090struct ctl_table_header *__register_sysctl_paths(
1091 struct ctl_table_set *set, 1091 struct ctl_table_set *set,
1092 const struct ctl_path *path, struct ctl_table *table); 1092 const struct ctl_path *path, struct ctl_table *table);
1093struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table);
1093struct ctl_table_header *register_sysctl_table(struct ctl_table * table); 1094struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
1094struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, 1095struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
1095 struct ctl_table *table); 1096 struct ctl_table *table);