[PATCH] modprobe / bug-generator 941 & 942

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sat Jul 15 20:26:50 UTC 2006


Natanael,
All,

On Saturday 15 July 2006 201, Natanael Copa wrote:
> * if 2_6_MODULES is enabled, modules.conf will never be read. I suppose
> even 2.6 kernel systems should try to read modules.conf?

If 2_6_MODULES is enabled, then we first try /etc/modprobe.conf, then we
_fallback_ to /etc/modules.conf, and _as a last resort_ to /etc/conf.modules.

I do not have /etc/modprobe.conf on my system, and I do successfully parse
/etc/modules.conf. I strace'd busybox when modprobe'ing, and here's what
I got with 2_6_MODULES enabled:

...
read(3, "", 2048)                       = 0
close(3)                                = 0
open("/etc/modprobe.conf", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/modules.conf", O_RDONLY)     = 3
read(3, "### This file is automatically g"..., 2048) = 2048
lseek(3, 0, SEEK_CUR)                   = 2048
lseek(3, 59, SEEK_SET)                  = 59
...

If 2_6_MODULES is not enabled, then we do not even try /etc/modprobe.conf.
Here's the same strace with 2_6_MODULES disabled:

...
read(3, "", 2048)                       = 0
close(3)                                = 0
open("/etc/modules.conf", O_RDONLY)     = 3
read(3, "### This file is automatically g"..., 2048) = 2048
lseek(3, 0, SEEK_CUR)                   = 2048
lseek(3, 59, SEEK_SET)                  = 59
...

So I guess you have another problem...

> * if 2_6_MODULES is not enabled the code for looking
> after /lib/modules/`uname -r`/modulues.alias will be included which is
> not necessary. Putting this inside a if(CONFIG_FEATURE_2_6_ENABLED)
> saves some bytes on a 2.4 system.

If there's no /lib/modules/`uname -r`/modules.alias in 2.4, then you are
right here.

> Please see the patch found here to see what I mean:
> http://busybox.net/lists/busybox/2006-July/023213.html

I'll do a merge of your patch and mine, and see what I can come up with.
Thanks for your input.

Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °---.----------------:  X  AGAINST      |  /e\  There is no  |
| web: ymorin.free.fr | SETI at home 3808 | / \ HTML MAIL    |  """  conspiracy.  |
°---------------------°----------------°------------------°--------------------°



More information about the busybox mailing list