diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-06-12 12:50:12 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-06-12 12:50:12 +0000 |
commit | 47b180b54c548771756407d7baa469eb75c06b6d (patch) | |
tree | 49a844458a34d9cab2b6ce882d5ad723faf5a6dd | |
parent | 870892f991fa020c05f7641f611d8e520f19678f (diff) | |
download | drakx-47b180b54c548771756407d7baa469eb75c06b6d.tar drakx-47b180b54c548771756407d7baa469eb75c06b6d.tar.gz drakx-47b180b54c548771756407d7baa469eb75c06b6d.tar.bz2 drakx-47b180b54c548771756407d7baa469eb75c06b6d.tar.xz drakx-47b180b54c548771756407d7baa469eb75c06b6d.zip |
allow to pass module options to probe-modules
-rw-r--r-- | mdk-stage1/NEWS | 2 | ||||
-rw-r--r-- | mdk-stage1/probe-modules.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index d41929ea4..28d7c69f3 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,5 @@ +- allow to pass module options to probe-modules + 1.28: - fix segfault with empty device description (can happen for USB devices) diff --git a/mdk-stage1/probe-modules.c b/mdk-stage1/probe-modules.c index 302f13864..6f162aed4 100644 --- a/mdk-stage1/probe-modules.c +++ b/mdk-stage1/probe-modules.c @@ -40,12 +40,18 @@ int main(int argc, char **argv, char **env) { enum media_bus bus = BUS_ANY; char *module = NULL; + char options[500] = ""; if (argc > 1) { if (streq(argv[1], "--usb")) { bus = BUS_USB; } else if (!ptr_begins_static_str(argv[1], "--")) { + int i; module = argv[1]; + for (i = 2; i < argc; i++) { + strcat(options, argv[i]); + strcat(options, " "); + } } } @@ -53,7 +59,7 @@ int main(int argc, char **argv, char **env) init_modules_insmoding(); if (module) { - my_insmod(module, ANY_DRIVER_TYPE, NULL, 0); + my_insmod(module, ANY_DRIVER_TYPE, options, 0); } else { find_media(bus); } |