summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/NEWS2
-rw-r--r--mdk-stage1/probe-modules.c8
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);
}