PARAM 3/4: PARAM() support in modules.

PARAM 3/4: PARAM() support in modules.

Post by Rusty Russel » Sun, 17 Nov 2002 00:40:26



"One-liner" to enable PARAM() support in modules.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: Parameter Implementation for modules
Author: Rusty Russell
Status: Tested on 2.5.38
Depends: Module/param.patch.gz

D: This activates parameter parsing for PARAM() declarations in modules.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .31807-linux-2.5.43/kernel/module.c .31807-linux-2.5.43.updated/kernel/module.c
--- .31807-linux-2.5.43/kernel/module.c 2002-10-18 17:17:25.000000000 +1000

 #include <linux/fcntl.h>
 #include <linux/rcupdate.h>
 #include <linux/cpu.h>
+#include <linux/params.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>

        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 *)

                         NULL);
        if (err < 0)
                goto cleanup;
-#endif

        /* Get rid of temporary copy */
        vfree(hdr);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/