aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-09-24 09:18:55 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-09-24 09:18:55 +0000
commit8930c54e77ed654ec9c07b4f1e65b8bb62885f32 (patch)
tree24f180e2e913ab1ea1b343adf74427c143d3458a /modutils/modprobe.c
parentfa219602e45f11f70d79f3724e2952a20b7a379c (diff)
downloadbusybox-w32-8930c54e77ed654ec9c07b4f1e65b8bb62885f32.tar.gz
busybox-w32-8930c54e77ed654ec9c07b4f1e65b8bb62885f32.tar.bz2
busybox-w32-8930c54e77ed654ec9c07b4f1e65b8bb62885f32.zip
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
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c5
1 files changed, 5 insertions, 0 deletions
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 *
470 return; 470 return;
471 } 471 }
472 472
473 if ( !path ) {
474 bb_error_msg ("module %s not found.", mod);
475 return;
476 }
477
473 // search for duplicates 478 // search for duplicates
474 for ( find = *head; find; find = find-> m_next ) { 479 for ( find = *head; find; find = find-> m_next ) {
475 if ( !strcmp ( mod, find-> m_name )) { 480 if ( !strcmp ( mod, find-> m_name )) {