diff --git a/mod_hello.c b/mod_hello.c index 98f63c4..4119ca9 100644 --- a/mod_hello.c +++ b/mod_hello.c @@ -36,17 +36,20 @@ long hello_fib(long times, long n1, long n2) return next; } + +static char *sym_name = "files"; +module_param(sym_name, charp, S_IRUGO); + static int __init hello_init(void) { long f_int, f_cap, f_start1, f_start2; - unsigned long sym_addr; - char *sym_name; char filename[255]; unsigned long jiffies_start, jiffies_diff; + unsigned long sym_addr; + hello_print_hello(); - sym_name = "files"; printk("looking up '%s'\n", sym_name); sym_addr = kallsyms_lookup_name(sym_name); printk("%s 0x%lx\n", sym_name, sym_addr);