+fi
+
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
+$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/sysctl.h>
+
+int
+main (void)
+{
+
+ struct ctl_table ctl;
+ ctl.ctl_name = 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTL_NAME 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
fi
rm -Rf build
+fi
+
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
+$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/sysctl.h>
+
+int
+main (void)
+{
+
+ struct ctl_table ctl;
+ ctl.ctl_name = 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTL_NAME 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
fi
rm -Rf build
#endif /* DEBUG_KMEM */
struct proc_dir_entry *proc_spl_kstat = NULL;
+#ifdef HAVE_CTL_NAME
#ifdef HAVE_CTL_UNNUMBERED
#define CTL_SPL CTL_UNNUMBERED
#endif
};
#endif /* HAVE_CTL_UNNUMBERED */
+#endif /* HAVE_CTL_NAME */
static int
proc_copyin_string(char *kbuffer, int kbuffer_size,
static struct ctl_table spl_debug_table[] = {
{
- .ctl_name = CTL_DEBUG_SUBSYS,
+ CTL_NAME (CTL_DEBUG_SUBSYS)
.procname = "subsystem",
.data = &spl_debug_subsys,
.maxlen = sizeof(unsigned long),
.proc_handler = &proc_dobitmasks
},
{
- .ctl_name = CTL_DEBUG_MASK,
+ CTL_NAME (CTL_DEBUG_MASK)
.procname = "mask",
.data = &spl_debug_mask,
.maxlen = sizeof(unsigned long),
.proc_handler = &proc_dobitmasks
},
{
- .ctl_name = CTL_DEBUG_PRINTK,
+ CTL_NAME (CTL_DEBUG_PRINTK)
.procname = "printk",
.data = &spl_debug_printk,
.maxlen = sizeof(unsigned long),
.proc_handler = &proc_dobitmasks
},
{
- .ctl_name = CTL_DEBUG_MB,
+ CTL_NAME (CTL_DEBUG_MB)
.procname = "mb",
.mode = 0644,
.proc_handler = &proc_debug_mb,
},
{
- .ctl_name = CTL_DEBUG_BINARY,
+ CTL_NAME (CTL_DEBUG_BINARY)
.procname = "binary",
.data = &spl_debug_binary,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_DEBUG_CATASTROPHE,
+ CTL_NAME (CTL_DEBUG_CATASTROPHE)
.procname = "catastrophe",
.data = &spl_debug_catastrophe,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_DEBUG_PANIC_ON_BUG,
+ CTL_NAME (CTL_DEBUG_PANIC_ON_BUG)
.procname = "panic_on_bug",
.data = &spl_debug_panic_on_bug,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec
},
{
- .ctl_name = CTL_DEBUG_PATH,
+ CTL_NAME (CTL_DEBUG_PATH)
.procname = "path",
.data = spl_debug_file_path,
.maxlen = sizeof(spl_debug_file_path),
.proc_handler = &proc_dostring,
},
{
- .ctl_name = CTL_DEBUG_DUMP,
+ CTL_NAME (CTL_DEBUG_DUMP)
.procname = "dump",
.mode = 0200,
.proc_handler = &proc_dump_kernel,
},
- { .ctl_name = CTL_DEBUG_FORCE_BUG,
+ { CTL_NAME (CTL_DEBUG_FORCE_BUG)
.procname = "force_bug",
.mode = 0200,
.proc_handler = &proc_force_bug,
},
{
- .ctl_name = CTL_CONSOLE_RATELIMIT,
+ CTL_NAME (CTL_CONSOLE_RATELIMIT)
.procname = "console_ratelimit",
.data = &spl_console_ratelimit,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_CONSOLE_MAX_DELAY_CS,
+ CTL_NAME (CTL_CONSOLE_MAX_DELAY_CS)
.procname = "console_max_delay_centisecs",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_console_max_delay_cs,
},
{
- .ctl_name = CTL_CONSOLE_MIN_DELAY_CS,
+ CTL_NAME (CTL_CONSOLE_MIN_DELAY_CS)
.procname = "console_min_delay_centisecs",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_console_min_delay_cs,
},
{
- .ctl_name = CTL_CONSOLE_BACKOFF,
+ CTL_NAME (CTL_CONSOLE_BACKOFF)
.procname = "console_backoff",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_console_backoff,
},
{
- .ctl_name = CTL_DEBUG_STACK_SIZE,
+ CTL_NAME (CTL_DEBUG_STACK_SIZE)
.procname = "stack_max",
.data = &spl_debug_stack,
.maxlen = sizeof(int),
static struct ctl_table spl_vm_table[] = {
{
- .ctl_name = CTL_VM_MINFREE,
+ CTL_NAME (CTL_VM_MINFREE)
.procname = "minfree",
.data = &minfree,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_DESFREE,
+ CTL_NAME (CTL_VM_DESFREE)
.procname = "desfree",
.data = &desfree,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_LOTSFREE,
+ CTL_NAME (CTL_VM_LOTSFREE)
.procname = "lotsfree",
.data = &lotsfree,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_NEEDFREE,
+ CTL_NAME (CTL_VM_NEEDFREE)
.procname = "needfree",
.data = &needfree,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_SWAPFS_MINFREE,
+ CTL_NAME (CTL_VM_SWAPFS_MINFREE)
.procname = "swapfs_minfree",
.data = &swapfs_minfree,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_SWAPFS_RESERVE,
+ CTL_NAME (CTL_VM_SWAPFS_RESERVE)
.procname = "swapfs_reserve",
.data = &swapfs_reserve,
.maxlen = sizeof(int),
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = CTL_VM_AVAILRMEM,
+ CTL_NAME (CTL_VM_AVAILRMEM)
.procname = "availrmem",
.mode = 0444,
.proc_handler = &proc_doavailrmem,
},
{
- .ctl_name = CTL_VM_FREEMEM,
+ CTL_NAME (CTL_VM_FREEMEM)
.procname = "freemem",
.data = (void *)2,
.maxlen = sizeof(int),
.proc_handler = &proc_dofreemem,
},
{
- .ctl_name = CTL_VM_PHYSMEM,
+ CTL_NAME (CTL_VM_PHYSMEM)
.procname = "physmem",
.data = &physmem,
.maxlen = sizeof(int),
#ifdef DEBUG_KMEM
static struct ctl_table spl_kmem_table[] = {
{
- .ctl_name = CTL_KMEM_KMEMUSED,
+ CTL_NAME (CTL_KMEM_KMEMUSED)
.procname = "kmem_used",
.data = &kmem_alloc_used,
# ifdef HAVE_ATOMIC64_T
.proc_handler = &proc_domemused,
},
{
- .ctl_name = CTL_KMEM_KMEMMAX,
+ CTL_NAME (CTL_KMEM_KMEMMAX)
.procname = "kmem_max",
.data = &kmem_alloc_max,
.maxlen = sizeof(unsigned long),
.proc_handler = &proc_doulongvec_minmax,
},
{
- .ctl_name = CTL_KMEM_VMEMUSED,
+ CTL_NAME (CTL_KMEM_VMEMUSED)
.procname = "vmem_used",
.data = &vmem_alloc_used,
# ifdef HAVE_ATOMIC64_T
.proc_handler = &proc_domemused,
},
{
- .ctl_name = CTL_KMEM_VMEMMAX,
+ CTL_NAME (CTL_KMEM_VMEMMAX)
.procname = "vmem_max",
.data = &vmem_alloc_max,
.maxlen = sizeof(unsigned long),
* sysctl(8) prefers to go via /proc for portability.
*/
{
- .ctl_name = CTL_VERSION,
+ CTL_NAME (CTL_VERSION)
.procname = "version",
.data = spl_version,
.maxlen = sizeof(spl_version),
.proc_handler = &proc_dostring,
},
{
- .ctl_name = CTL_HOSTID,
+ CTL_NAME (CTL_HOSTID)
.procname = "hostid",
.data = &spl_hostid,
.maxlen = sizeof(unsigned long),
.proc_handler = &proc_dohostid,
},
{
- .ctl_name = CTL_HW_SERIAL,
+ CTL_NAME (CTL_HW_SERIAL)
.procname = "hw_serial",
.data = hw_serial,
.maxlen = sizeof(hw_serial),
},
#ifndef HAVE_KALLSYMS_LOOKUP_NAME
{
- .ctl_name = CTL_KALLSYMS,
+ CTL_NAME (CTL_KALLSYMS)
.procname = "kallsyms_lookup_name",
.data = &spl_kallsyms_lookup_name_fn,
.maxlen = sizeof(unsigned long),
},
#endif
{
- .ctl_name = CTL_SPL_DEBUG,
+ CTL_NAME (CTL_SPL_DEBUG)
.procname = "debug",
.mode = 0555,
.child = spl_debug_table,
},
{
- .ctl_name = CTL_SPL_VM,
+ CTL_NAME (CTL_SPL_VM)
.procname = "vm",
.mode = 0555,
.child = spl_vm_table,
},
#ifdef DEBUG_KMEM
{
- .ctl_name = CTL_SPL_KMEM,
+ CTL_NAME (CTL_SPL_KMEM)
.procname = "kmem",
.mode = 0555,
.child = spl_kmem_table,
},
#endif
{
- .ctl_name = CTL_SPL_KSTAT,
+ CTL_NAME (CTL_SPL_KSTAT)
.procname = "kstat",
.mode = 0555,
.child = spl_kstat_table,
static struct ctl_table spl_dir[] = {
{
- .ctl_name = CTL_SPL,
+ CTL_NAME (CTL_SPL)
.procname = "spl",
.mode = 0555,
.child = spl_table,
static struct ctl_table spl_root[] = {
{
- .ctl_name = CTL_KERN,
+ CTL_NAME (CTL_KERN)
.procname = "kernel",
.mode = 0555,
.child = spl_dir,