From 8930c54e77ed654ec9c07b4f1e65b8bb62885f32 Mon Sep 17 00:00:00 2001 From: bug1 Date: Fri, 24 Sep 2004 09:18:55 +0000 Subject: Patch from Egor Duda Attached patch prevents modprobe from trying to call 'insmod (null)' whenever nonexistent module is either passed to modprobe via command line or mentioned in modules.dep this replaces cryptic error sh: Syntax error: word unexpected (expecting ")") with modprobe: module some-module not found. egor. git-svn-id: svn://busybox.net/trunk/busybox@9276 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- modutils/modprobe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 98003ca16..83244fca5 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -470,6 +470,11 @@ static void check_dep ( char *mod, struct mod_list_t **head, struct mod_list_t * return; } + if ( !path ) { + bb_error_msg ("module %s not found.", mod); + return; + } + // search for duplicates for ( find = *head; find; find = find-> m_next ) { if ( !strcmp ( mod, find-> m_name )) { -- cgit v1.2.3-55-g6feb