2004-01-03 16:45:12

by Juergen Quade

[permalink] [raw]
Subject: module_param( byte ... ) missing?

Rusty,

using the "byte"-datatype as module parameter throws a compile error.
Other than stated in the comment of the headerfile <linux/moduleparam.h>

/* Helper functions: type is byte, short, ushort, int, uint, long,
ulong, charp, bool or invbool, or XXX if you define param_get_XXX,
param_set_XXX and param_check_XXX. */
#define module_param_named(name, value, type, perm)
...

the datatype _byte_ seems not be implemented.
Have you dropped it intentionally?

Juergen.


2004-01-04 04:30:41

by Rusty Russell

[permalink] [raw]
Subject: Re: module_param( byte ... ) missing?

In message <[email protected]> you write:
> Rusty,
>
> using the "byte"-datatype as module parameter throws a compile error.
> Other than stated in the comment of the headerfile <linux/moduleparam.h>
>
> /* Helper functions: type is byte, short, ushort, int, uint, long,
> ulong, charp, bool or invbool, or XXX if you define param_get_XXX,
> param_set_XXX and param_check_XXX. */
> #define module_param_named(name, value, type, perm)
> ...
>
> the datatype _byte_ seems not be implemented.
> Have you dropped it intentionally?

No, just not implemented; the comment is overzealous.

Of course, you can implement byte in two ways: you can do it in your
own module (effectively a private type), or in kernel/params.c. I'd
prefer the former, and if lots of modules use it, we move it to
kernel/params.c.

Hope that clarifies,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.