modprobe and more than one option in /etc/modules.conf
zze-homelan Yann E. MORIN ext RD-RESA-REN
ymorin.ext at rd.francetelecom.com
Tue Sep 27 14:21:11 UTC 2005
Hi!
We are using busybox-1.01 and modprobe'ing our modules.
One of our modules needs some options, so we made the file
/etc/modules.conf which caontains:
-8<---
options mod_name value1=string1 value2=string2 value3=3
-8<---
The module initialise its string options to NULL, and the
int value to 0. When inserted, it prints its options' value
whith printk:
-8<---
printk("value1=\"%s\"\n", value1 );
printk("value2=\"%s\"\n", value2 );
printk("value3=\"%d\"\n", value3 );
-8<---
Then we modprobe the module with:
[me at there] modprobe mod_name
which gives the following output:
-8<---
value1="string1 value2=string2 value3=3"
value2=""
value3="0"
-8<---
which is obviously not what is intended! ;-)
We traced the (presumed) bug to be in modprobe.c:
- between 1.00 and 1.01, the option parsing has changed, and
is now handled with a char *argv[10] given to execvp(), rather
than the 1.00 system() call. I guess 1.00 behaves correctly
as the parsing is handled by the shell!
- in 1.01, the 'culprit' seems to be line 416 which prepares a
single argument to be passed to insmod, when insmod awaits one
argument for each option to be passed to the module.
This behavior was introduced in revision 11043:
http://busybox.net/cgi-bin/viewcvs.cgi?rev=11043&view=rev
I'm working on a replacement for this line 416. I'll be
looking in ash's argument splitting to see how it is handled
there (obviously we can't simply cut on spaces as there might
be options that are quoted to integrate spaces, blahblah...).
If any one has a better idea, please ring the bell!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON |
| +0/33 299123179 | Software Designer | \ / CAMPAIGN |
| --==< °_° >==-- °---.----------------: X AGAINST |
| ymorin.ext at rd.francetelecom.com | / \ HTML MAIL |
°--------------------------------------°------------------°
More information about the busybox
mailing list