Linux-2.6.33 compat, .ctl_name removed from struct ctl_table

As of linux-2.6.33 the ctl_name member of the ctl_table struct
has been entirely removed.  The upstream code has been updated
to depend entirely on the the procname member.  To handle this
all references to ctl_name are wrapped in a CTL_NAME macro which
simply expands to nothing for newer kernels.  Older kernels are
supported by having it expand to .ctl_name = X just as before.
This commit is contained in:
Brian Behlendorf
2010-06-30 10:36:20 -07:00
parent fd921c2e0c
commit 79a3bf130b
5 changed files with 201 additions and 38 deletions
+6
View File
@@ -36,6 +36,12 @@
#define spl_unregister_sysctl_table(t) unregister_sysctl_table(t)
#endif /* CONFIG_SYSCTL */
#ifdef HAVE_CTL_NAME
#define CTL_NAME(cname) .ctl_name = (cname),
#else
#define CTL_NAME(cname)
#endif
extern struct proc_dir_entry *proc_spl_kstat;
struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
const char *str);