Re: 2.6.1-mm4
From: Rusty Russell
Date: Wed Jan 21 2004 - 22:34:27 EST
In message <20040121134657.6cd27cbd.ak@xxxxxxx> you write:
> As for the implementation of doing it at runtime - i took a look at
> it but got scared by sysfs livetime rules and the lack of callbacks
> in module_parm.
FYI module_parm is just a convenience wrapper around
module_param_call(name, set, get, arg, perm)
Where get and set are the callbacks:
/* Returns 0, or -errno. arg is in kp->arg. */
typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
/* Returns length written or -errno. Buffer is 4k (ie. be short!) */
typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
With these the implementation should be fairly neat.
Hope that clarifies,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/