diff options
author | Glenn L McGrath | 2004-09-24 09:18:55 +0000 |
---|---|---|
committer | Glenn L McGrath | 2004-09-24 09:18:55 +0000 |
commit | bdf6319d3a2d0ee085d6ee45d1e63cb38805e30a (patch) | |
tree | 24f180e2e913ab1ea1b343adf74427c143d3458a /modutils | |
parent | 53090cdedd150ef17b480193b75a325b53af94fe (diff) | |
download | busybox-bdf6319d3a2d0ee085d6ee45d1e63cb38805e30a.zip busybox-bdf6319d3a2d0ee085d6ee45d1e63cb38805e30a.tar.gz |
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.
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modprobe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 98003ca..83244fc 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 )) { |