summaryrefslogtreecommitdiff
path: root/include/linux/sysctl.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-01-22 18:22:05 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-01-24 16:40:27 -0800
commitf728019bb72e655680c02ad1829323054a8e875f (patch)
treecc1915e06b806004c662abb0f0cb4f897111be1c /include/linux/sysctl.h
parentec6a52668d0bbc6d648e978c327150254bf1ce7f (diff)
sysctl: register only tables of sysctl files
Split the registration of a complex ctl_table array which may have arbitrary numbers of directories (->child != NULL) and tables of files into a series of simpler registrations that only register tables of files. Graphically: register('dir', { + file-a + file-b + subdir1 + file-c + subdir2 + file-d + file-e }) is transformed into: wrapper->subheaders[0] = register('dir', {file1-a, file1-b}) wrapper->subheaders[1] = register('dir/subdir1', {file-c}) wrapper->subheaders[2] = register('dir/subdir2', {file-d, file-e}) return wrapper This guarantees that __register_sysctl_table will only see a simple ctl_table array with all entries having (->child == NULL). Care was taken to pass the original simple ctl_table arrays to __register_sysctl_table whenever possible. This change is derived from a similar patch written by Lucrian Grijincu. Inspired-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r--include/linux/sysctl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index a514e0f6056d..25c7dfe1a7ec 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1015,7 +1015,7 @@ struct ctl_table
void *data;
int maxlen;
umode_t mode;
- struct ctl_table *child;
+ struct ctl_table *child; /* Deprecated */
struct ctl_table *parent; /* Automatically set */
proc_handler *proc_handler; /* Callback for text formatting */
struct ctl_table_poll *poll;