Function name is already displayed and allow to differenciate all skip ... messages With shorter message and function name, and using relative path for kernel modules, 80% of debug messages may need only one line. That's far easier to read and messages disappear slower on screen.
Add a comment why a while loop is used on maint Signed-off-by: Gilles Espinasse <[email protected]> --- modutils/modprobe.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modutils/modprobe.c b/modutils/modprobe.c index bef6579..da2c99c 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -128,7 +128,7 @@ static void add_probe(const char *name) if (!(option_mask32 & MODPROBE_OPT_REMOVE) && (m->flags & MODULE_FLAG_LOADED) ) { - DBG("skipping %s, it is already loaded", name); + DBG("skip %s : already loaded", name); return; } @@ -280,7 +280,7 @@ static int do_modprobe(struct module_entry *m) } if (m2->flags & MODULE_FLAG_LOADED) { - DBG("%s is already loaded, skipping", fn); + DBG("skip %s : already loaded", fn); continue; } @@ -305,7 +305,7 @@ static int do_modprobe(struct module_entry *m) return rc; } -static void load_modules_dep(void) +static void load_mod_dep(void) { struct module_entry *m; char *colon, *tokens[2]; @@ -335,7 +335,7 @@ static void load_modules_dep(void) if ((m->flags & MODULE_FLAG_LOADED) && !(option_mask32 & MODPROBE_OPT_REMOVE) ) { - DBG("skip deps of %s, it's already loaded", tokens[0]); + DBG("skip %s : already loaded", tokens[0]); continue; } @@ -414,13 +414,14 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) read_config("/etc/modprobe.d"); if (ENABLE_FEATURE_MODUTILS_SYMBOLS && G.need_symbols) read_config("modules.symbols"); - load_modules_dep(); + load_mod_dep(); if (ENABLE_FEATURE_MODUTILS_ALIAS && G.num_unresolved_deps) { read_config("modules.alias"); - load_modules_dep(); + load_mod_dep(); } rc = 0; + /* modprobe -r allow to unload more than one module */ while ((me = llist_pop(&G.probes)) != NULL) { if (me->realnames == NULL) { DBG("probing by module name"); -- 1.6.0.6 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
