On Thu, 14 Jan 1999, Phil Daly wrote:

> I am trying to pass command line arguments into a module (doesn't have to be
> a real time module, of course). I can get around the well-known problem of
> not being able to pass numeric values by hiding them in strings. The question
> is how to convert them back after - atoi does not work in the module.
> 
> To run the code (after compiling it):
> 
>   % insmod args arg1='dset=1024' arg2='freq=256' arg3='rate=8' arg4='time=4'
> 

Hmmmm, I thought you could do variable assignment straight from the
command line. That is, if your code has a global variable named 'freq'
(int freq), you could just assign this on the command line with 

%insmod module freq=1024

Because the first value is a digit, the kernel should consider the value
an integer. I think the LDP on Module indicates this as well
(http://metalab.unc.edu/LDP/LDP/lkmpg/node11.html).

What you seem to be doing is reparsing strings to get integers.

-Don

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to