[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: modutils and module-init-tools duplicating work



On Sun, 2003-08-31 at 20:59, Roberto Sanchez wrote:
>  --- Micha Feigin <michafeigin@yahoo.com> escribió: 
> > > modultils -- kernel < 2.5.48
> > > module-init-tools -- kernel >= 2.5.48
> > > 
> > > Of course, module if module-init-tools finds an earlier kernel, it passes
> > the
> > > work on to the old version.
> > > 
> > 
> > They are still almost the same, except for the check whether to run
> > depmod in module-init-tools. Why do we need two of them?
> > 
> 
> Because, as of kernel 2.5.48 the kernel modules now end in .ko and have a
> completely different internal structure.  The new module-init-tools does not
> handle old style modules, but recognizes and passes them on to modutils.
> The old modutils knows nothing of the new formats and will barf all over itself
> if you attempt to build, load, remove, or otherwise operate on a module with
> it.
> 
> The short answer is: because they are not cross compatible.
> 

I'm afraid that you are just speculating and didn't bother to actually
read the code. Just for the fun of it I just commented out the line that
checks for kernel version 2.5.48 and up, i.e.
# [ -f /proc/modules -a ! -f /proc/ksyms ] || exit 0
and fixed a cosmetic bug with the echo that prints what module is
loading:
echo " $module"
instead of
echo " $module\t"
either the \t is not needed, or its supposed to be echo -e and probably
a \n
I then tried it out on 2.4 and 2.6 and it works like a charm on both, no
barfing or anything. Will most probably also work with 2.2 kernel. The
only difference between them (except for cosmetic ones) is the check
whether to run depmod. I'm aware of the .ko extension and the only place
it appears is when checking whether to run depmod, and .o is also
checked in that instance.
Having both of them is most certainly redundant which translate into a
bug.

> -Roberto
> 
> ___________________________________________________
> Yahoo! Messenger - Nueva versión GRATIS
> Super Webcam, voz, caritas animadas, y más...
> http://messenger.yahoo.es
> 
-- 
Micha Feigin
michf@math.tau.ac.il



Reply to: