From 2d931d8e4e0c84585ebd6f1ec1e74afb13902d0c Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Wed, 15 Mar 2006 16:28:01 +0000 Subject: [PATCH] STABLE14-linux26-module-parm-versus-param-20060315 FIXES 27588 deal with 2.6 changes (cherry picked from commit 5ca54f23629145a9452345bd2d514b8fb571f735) --- src/afs/LINUX/osi_probe.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c index d2b777c775..2c2de48e39 100644 --- a/src/afs/LINUX/osi_probe.c +++ b/src/afs/LINUX/osi_probe.c @@ -114,16 +114,28 @@ /* Allow the user to specify sys_call_table addresses */ static unsigned long sys_call_table_addr[4] = { 0,0,0,0 }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param_array(sys_call_table_addr, long, NULL, 0); +#else MODULE_PARM(sys_call_table_addr, "1-4l"); +#endif MODULE_PARM_DESC(sys_call_table_addr, "Location of system call tables"); /* If this is set, we are more careful about avoiding duplicate matches */ static int probe_carefully = 1; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param(probe_carefully, int, 0); +#else MODULE_PARM(probe_carefully, "i"); +#endif MODULE_PARM_DESC(probe_carefully, "Probe for system call tables carefully"); static int probe_ignore_syscalls[8] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param_array(probe_ignore_syscalls, int, NULL, 0); +#else MODULE_PARM(probe_ignore_syscalls, "1-8i"); +#endif MODULE_PARM_DESC(probe_ignore_syscalls, "Syscalls to ignore in table checks"); #ifdef OSI_PROBE_DEBUG @@ -138,19 +150,35 @@ MODULE_PARM_DESC(probe_ignore_syscalls, "Syscalls to ignore in table checks"); * 0x0040 - automatically ignore setgroups and afs_syscall */ static int probe_debug = 0x41; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param(probe_debug, int, 0); +#else MODULE_PARM(probe_debug, "i"); +#endif MODULE_PARM_DESC(probe_debug, "Debugging level"); static unsigned long probe_debug_addr[4] = { 0,0,0,0 }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param_array(probe_debug_addr, long, NULL, 0); +#else MODULE_PARM(probe_debug_addr, "1-4l"); +#endif MODULE_PARM_DESC(probe_debug_addr, "Debug range starting locations"); static unsigned long probe_debug_range = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param(probe_debug_range, long, 0); +#else MODULE_PARM(probe_debug_range, "l"); +#endif MODULE_PARM_DESC(probe_debug_range, "Debug range length"); static unsigned long probe_debug_tag = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +module_param(probe_debug_tag, long, 0); +#else MODULE_PARM(probe_debug_tag, "l"); +#endif MODULE_PARM_DESC(probe_debug_tag, "Debugging output start tag"); #endif