aboutsummaryrefslogtreecommitdiff
path: root/libbb/recursive_action.c
AgeCommit message (Collapse)Author
2004-04-06Christian Grigis, christian.grigis at smartdata dot ch writes:Eric Andersen
Hello everyone, Busybox's insmod fails to locate a module when that module is the only one existing in the /lib/modules directory (with a unique name). Example: # find /lib/modules/ -type f /lib/modules/kernel/drivers/char/bios.o # insmod bios insmod: bios.o: no module by that name found # touch /lib/modules/dummy # find /lib/modules/ -type f /lib/modules/kernel/drivers/char/bios.o /lib/modules/dummy # insmod bios Using /lib/modules/kernel/drivers/char/bios.o As long as there is another file in the /lib/modules directory, insmod finds it OK. I tracked the problem down to 'check_module_name_match()' in insmod.c: It returns TRUE when a match is found, and FALSE otherwise. In the case where there is only one module in the /lib/modules directory (or more that one module, but all with the same name), 'recursive_action()' will return TRUE and we end up on line 4196 in 'insmod.c' which returns an error. [The reason it works with more than one module with different names is that in this case there will always be one not matching, 'recursive_action()' will return FALSE and we end up in line 4189.] Now, from the implementation of 'recursive_action()' and from other usages of it (tar.c, etc.), it seems to me that FALSE should be returned to indicate that we want to stop the recursion, so TRUE and FALSE should be inverted in 'check_module_name_match()'. At the same time, 'recursive_action()' continues to recurse even after the recursive call has returned FALSE; again in my understanding and other usages of it, we can safely stop recursing at this point. Here is my patch against 1.00-pre8:
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-07-14Update a bunch of docs. Run a script to update my email addr.Eric Andersen
2003-05-26Vodz, last_patch_86Glenn L McGrath
2003-03-19Major coreutils update.Manuel Novoa III
2002-11-28Use error_msg instead of fprintf(stderrGlenn L McGrath
2001-12-20Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.Matt Kraai
2001-10-24Major rework of the directory structure and the entire build system.Eric Andersen
-Erik
2001-04-25Move messages.c to libbb. Make each string in messages.c be its own .o file.Eric Andersen
This way, we can new get rid of all that tedious #define rubbish we used to need to enable specific messages. This way is enormously simpler, and as a bonus also ends up saving us 96 bytes. -Erik
2001-04-10Patch from Valdimir to reduce stack usage, since recursive_actionEric Andersen
is (as the name implies) is recursive, reducing stack memory usage is important to avoid exhausting available stack memory.
2001-03-21A nice patch from Larry Doolittle that adds -Wshadow andEric Andersen
cleans up most of the now-revealed problems.
2001-03-16Convert utility.c into libbb.a. It is now a whole pile of .cEric Andersen
files. Clean up the resulting damage and fix up the makefile. -Erik