On Tuesday 14 September 2010 00:12, Dan Fandrich wrote: > On Sun, Sep 12, 2010 at 04:59:14PM +0200, Denys Vlasenko wrote: > > On Thu, Sep 9, 2010 at 10:14 PM, Dan Fandrich <d...@coneharvesters.com> > > wrote: > > > Previously, rmmod would display an error message when the module > > > WAS removed, > > > > Can't reproduce this. Can you give exact steps how to make it happen? > > I don't have to do anything special to make rmmod say nothing when it > fails to remove a module. But it looks like modules.dep et. al.
(note: "small modprobe" uses modules.dep.bb with a slightly different format) > must not > exist in order for rmmod to complain when it DOES remove a module (i.e. > /lib/modules/`uname -r`/ must exist but be empty). Is this a problem? Standard "modprobe -r" doesn't work at all with empty /lib/modules/`uname -r`/. This is simply is not a supported way of using modules. But yes, rmmod'ing and then complaining about it is confusing. I think I just fixed this by: http://git.busybox.net/busybox/commit/?id=5b3151c201f4a67e998ec054d653e8177679d505 can you confirm? > On a defconfig busybox > on x86: > > $ sudo ./busybox rmmod NON_LOADED_MODULE # Should give error, but doesn't > $ sudo ./busybox insmod qnx4.ko > $ sudo ./busybox rmmod qnx4 # Gives error when it shouldn't > rmmod: module 'qnx4' not found > $ sudo ./busybox rmmod qnx4 # This time should give error but > doesn't > $ > > > > and would display no error when the module WAS NOT removed. > > > > This seems to be a feature. MODPROBE_SMALL is making some > > simplifying assumptions, one of them is that "rmmod == modprobe -r". > > And "modprobe -r NON_LOADED_MODULE" does not error out. > > modprobe from module-init-tools does show an error message if > NON_LOADED_MODULE is also not found in modules.dep (this is assuming > modules.dep exists or it gives another error): > > $ sudo modprobe -r xyzzy > FATAL: Module xyzzy not found. > $ Making "small rmmod" compatible with this case means making it read modules.dep.bb even though module is not found in /proc/modules, i.e. to do useless work. > It does not show anything if the modules is found in modules.dep, > even if it's not loaded: > > $ sudo modprobe -r qnx4 > $ sudo modprobe -r qnx4 > $ Can you list the fixes you'd like to see to "small" modprobe, ordered by severity of the problem? Not all of them look equally important... -- vda _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox