Module parameters 2/3
PATCH 1/1 Module parameters 2/3
This puts support into modules for module_param().
Name: Parameter Implementation for modules
Author: Rusty Russell
Status: Tested on 2.5.50
Depends: Module/param.patch.gz
D: This activates parameter parsing for module_param() declarations in modules.
kernel/module.c +2 -3
@@ -25,6 +25,7 @@#include <linux/fcntl.h> #include <linux/rcupdate.h> #include <linux/cpu.h> +#include <linux/moduleparam.h> #include <asm/uaccess.h> #include <asm/semaphore.h> #include <asm/pgalloc.h>
@@ -951,8 +952,7 @@ static struct module *load_module(void *if (err <0 ) goto cleanup; -#if 0 /* Needs param support */ -/* Size of section 0 is 0, so this works well */ +/* Size of section 0 is 0, so this works well if no params */ err = parse_args(mod->args, (struct kernel_param *) sechdrs[setupindex].sh_offset,
@@ -961,7 +961,6 @@ static struct module *load_module(void * NULL);if (err <0 ) goto cleanup; -#endif /* Get rid of temporary copy */ vfree (hdr);
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.