summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-11 18:38:19 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-11 18:38:19 +0000
commit5c57d8cf2d21a73e5b5d15e078e82b214d15a006 (patch)
tree40749d301fef81ad23f65c85df36f4f0ed63632a
parentd59cd149b137b166b119fa3885d635e5a5bbcca7 (diff)
downloaddrakx-5c57d8cf2d21a73e5b5d15e078e82b214d15a006.tar
drakx-5c57d8cf2d21a73e5b5d15e078e82b214d15a006.tar.gz
drakx-5c57d8cf2d21a73e5b5d15e078e82b214d15a006.tar.bz2
drakx-5c57d8cf2d21a73e5b5d15e078e82b214d15a006.tar.xz
drakx-5c57d8cf2d21a73e5b5d15e078e82b214d15a006.zip
load module passed as argument (if any), instead of probing bus
-rw-r--r--mdk-stage1/probe-modules.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/mdk-stage1/probe-modules.c b/mdk-stage1/probe-modules.c
index 1b5c8f2db..302f13864 100644
--- a/mdk-stage1/probe-modules.c
+++ b/mdk-stage1/probe-modules.c
@@ -39,12 +39,25 @@ void fatal_error(char *msg)
int main(int argc, char **argv, char **env)
{
enum media_bus bus = BUS_ANY;
- if (argc > 1 && streq(argv[1], "--usb")) {
- bus = BUS_USB;
+ char *module = NULL;
+
+ if (argc > 1) {
+ if (streq(argv[1], "--usb")) {
+ bus = BUS_USB;
+ } else if (!ptr_begins_static_str(argv[1], "--")) {
+ module = argv[1];
+ }
}
+
open_log();
init_modules_insmoding();
- find_media(bus);
+
+ if (module) {
+ my_insmod(module, ANY_DRIVER_TYPE, NULL, 0);
+ } else {
+ find_media(bus);
+ }
+
close_log();
return 0;