aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sysctl.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-10-18 06:05:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:22 -0400
commitd8217f076b73441dd3869c0c880df000655084cc (patch)
tree279c6bda7b3ad8bc8cd8099681a93d59fd193f26 /include/linux/sysctl.h
parentd32c4f2626acc385d5187bd5c0c24f442328dc60 (diff)
sysctl core: Stop using the unnecessary ctl_table typedef
In sysctl.h the typedef struct ctl_table ctl_table violates coding style isn't needed and is a bit of a nuisance because it makes it harder to recognize ctl_table is a type name. So this patch removes it from the generic sysctl code. Hopefully I will have enough energy to send the rest of my patches will follow and to remove it from the rest of the kernel. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r--include/linux/sysctl.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 483050c924c3..f73be4cd662e 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -937,37 +937,37 @@ extern int sysctl_perm(struct ctl_table *table, int op);
937 937
938typedef struct ctl_table ctl_table; 938typedef struct ctl_table ctl_table;
939 939
940typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, 940typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen,
941 void __user *oldval, size_t __user *oldlenp, 941 void __user *oldval, size_t __user *oldlenp,
942 void __user *newval, size_t newlen); 942 void __user *newval, size_t newlen);
943 943
944typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, 944typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp,
945 void __user *buffer, size_t *lenp, loff_t *ppos); 945 void __user *buffer, size_t *lenp, loff_t *ppos);
946 946
947extern int proc_dostring(ctl_table *, int, struct file *, 947extern int proc_dostring(struct ctl_table *, int, struct file *,
948 void __user *, size_t *, loff_t *); 948 void __user *, size_t *, loff_t *);
949extern int proc_dointvec(ctl_table *, int, struct file *, 949extern int proc_dointvec(struct ctl_table *, int, struct file *,
950 void __user *, size_t *, loff_t *); 950 void __user *, size_t *, loff_t *);
951extern int proc_dointvec_bset(ctl_table *, int, struct file *, 951extern int proc_dointvec_bset(struct ctl_table *, int, struct file *,
952 void __user *, size_t *, loff_t *); 952 void __user *, size_t *, loff_t *);
953extern int proc_dointvec_minmax(ctl_table *, int, struct file *, 953extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *,
954 void __user *, size_t *, loff_t *); 954 void __user *, size_t *, loff_t *);
955extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, 955extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *,
956 void __user *, size_t *, loff_t *); 956 void __user *, size_t *, loff_t *);
957extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *, 957extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *,
958 void __user *, size_t *, loff_t *); 958 void __user *, size_t *, loff_t *);
959extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *, 959extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *,
960 void __user *, size_t *, loff_t *); 960 void __user *, size_t *, loff_t *);
961extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, 961extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *,
962 void __user *, size_t *, loff_t *); 962 void __user *, size_t *, loff_t *);
963extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, 963extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
964 struct file *, void __user *, size_t *, loff_t *); 964 struct file *, void __user *, size_t *, loff_t *);
965 965
966extern int do_sysctl (int __user *name, int nlen, 966extern int do_sysctl (int __user *name, int nlen,
967 void __user *oldval, size_t __user *oldlenp, 967 void __user *oldval, size_t __user *oldlenp,
968 void __user *newval, size_t newlen); 968 void __user *newval, size_t newlen);
969 969
970extern int do_sysctl_strategy (ctl_table *table, 970extern int do_sysctl_strategy (struct ctl_table *table,
971 int __user *name, int nlen, 971 int __user *name, int nlen,
972 void __user *oldval, size_t __user *oldlenp, 972 void __user *oldval, size_t __user *oldlenp,
973 void __user *newval, size_t newlen); 973 void __user *newval, size_t newlen);
@@ -980,7 +980,7 @@ extern ctl_handler sysctl_ms_jiffies;
980 980
981/* 981/*
982 * Register a set of sysctl names by calling register_sysctl_table 982 * Register a set of sysctl names by calling register_sysctl_table
983 * with an initialised array of ctl_table's. An entry with zero 983 * with an initialised array of struct ctl_table's. An entry with zero
984 * ctl_name and NULL procname terminates the table. table->de will be 984 * ctl_name and NULL procname terminates the table. table->de will be
985 * set up by the registration and need not be initialised in advance. 985 * set up by the registration and need not be initialised in advance.
986 * 986 *
@@ -1026,8 +1026,8 @@ struct ctl_table
1026 void *data; 1026 void *data;
1027 int maxlen; 1027 int maxlen;
1028 mode_t mode; 1028 mode_t mode;
1029 ctl_table *child; 1029 struct ctl_table *child;
1030 ctl_table *parent; /* Automatically set */ 1030 struct ctl_table *parent; /* Automatically set */
1031 proc_handler *proc_handler; /* Callback for text formatting */ 1031 proc_handler *proc_handler; /* Callback for text formatting */
1032 ctl_handler *strategy; /* Callback function for all r/w */ 1032 ctl_handler *strategy; /* Callback function for all r/w */
1033 void *extra1; 1033 void *extra1;
@@ -1035,16 +1035,16 @@ struct ctl_table
1035}; 1035};
1036 1036
1037/* struct ctl_table_header is used to maintain dynamic lists of 1037/* struct ctl_table_header is used to maintain dynamic lists of
1038 ctl_table trees. */ 1038 struct ctl_table trees. */
1039struct ctl_table_header 1039struct ctl_table_header
1040{ 1040{
1041 ctl_table *ctl_table; 1041 struct ctl_table *ctl_table;
1042 struct list_head ctl_entry; 1042 struct list_head ctl_entry;
1043 int used; 1043 int used;
1044 struct completion *unregistering; 1044 struct completion *unregistering;
1045}; 1045};
1046 1046
1047struct ctl_table_header * register_sysctl_table(ctl_table * table); 1047struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
1048 1048
1049void unregister_sysctl_table(struct ctl_table_header * table); 1049void unregister_sysctl_table(struct ctl_table_header * table);
1050 1050