diff options
author | John Crispin <blogic@openwrt.org> | 2013-11-08 22:59:58 +0100 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-11-11 13:28:10 +0100 |
commit | 2fdd374f4214129d93f10b7001adece9239752a2 (patch) | |
tree | 82eb5b46d882af37a53e1ac03644fa6cae8354b2 /kmodloader.c | |
parent | 0588218d4bc58b0e099272338decbe4734f5678b (diff) | |
download | ubox-2fdd374f4214129d93f10b7001adece9239752a2.tar.gz |
kmod-loader: fix module options support when using modprobe
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'kmodloader.c')
-rw-r--r-- | kmodloader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kmodloader.c b/kmodloader.c index 11af0ae..3238190 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -55,6 +55,7 @@ struct module { char *name; char *depends; + char *options; int size; int usage; @@ -455,7 +456,7 @@ static int load_modprobe(void) todo = 0; avl_for_each_element(&modules, m, avl) { if ((m->state == PROBE) && (!deps_available(m, 0))) { - if (!insert_module(get_module_path(m->name), "")) { + if (!insert_module(get_module_path(m->name), m->options)) { m->state = LOADED; m->error = 0; loaded++; @@ -709,6 +710,7 @@ static int main_loader(int argc, char **argv) if (!m || (m->state == LOADED)) continue; + m->options = opts; m->state = PROBE; if (basename(gl.gl_pathv[j])[0] - '0' <= 9) load_modprobe(); |