On Friday 21 November 2008 14:51, Timo Teräs wrote:
> Bernhard Reutner-Fischer wrote:
> > On Fri, Nov 21, 2008 at 02:11:05PM +0100, Natanael Copa wrote:
> >> On Fri, 2008-11-21 at 14:34 +0200, Timo Teräs wrote:
> >>
> >>> Ok, this is what I came up with so far.
> >>>
> >>> I originally wrote the modutils replacement in accordance with
> >>> module-init-tools. In module-init-tools insmod does no attempt to search
> >>> the module from directories. But since bb used to do this, I guess we
> >>> should keep the behavior.
> >> would it be an idea to have this as an compile option?
> > 
> > insmod should not search itself as opposed to modprobe, just as
> > module-init-tools does.
> 
> My take on the matter too. But since we supported that earlier,
> and it was explicitly reported broken and a patch was sent; I
> did my version of it as promised.

This makes people who use busybox to unknowingly use
busybox's incompatible extension. If they will ever need
to migrate their system (or a part of it, say, some scripts)
back to "big" system, they will have unexpected breakage.

If we are dropping such an incompatible behavior, it causes
short-term problems for users already using it,
but eliminates long-term source of problems.

I prefer to drop "insmod searches for modules" thing.

However:

http://linux.die.net/man/8/insmod says:

insmod [filename] [module options ...]
insmod is a trivial program to insert a module into the kernel:
if the filename is a hyphen, the module is taken from standard
input. Most users will want to use modprobe(8) instead,
which is cleverer.
This version of insmod is for kernels 2.5.48 and above.

but http://www.digipedia.pl/man/insmod.old.8.html says:

insmod.old (8)
insmod
    [-fhkLmnpqrsSvVxXyYN] [-e persist_name] [-o module_name] [-O blob_name] [-P 
prefix] module [ symbol=value ... ]
...
If the module file name is given without directories or extension,
insmod will search for the module in some common default directories.
The environment variable MODPATH can be used to override this default.
If a module configuration file such as /etc/modules.conf exists,
it will override the paths defined in MODPATH.


Total chaos. Looks like old "standard" insmod indeed did search
for the module, and then Rusty Russell's new tools stopped
doing this. Actually, they seems to be _very_ simplistic:

# ./insmod --help
insmod: can't read '--help': No such file or directory
# ./insmod
Usage: ./insmod filename [args]


For now, I'm just putting the comment explaining this into insmod.c.

Other suggestions?
--
vda

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to