diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-11 18:38:19 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-11 18:38:19 +0000 |
commit | 5c57d8cf2d21a73e5b5d15e078e82b214d15a006 (patch) | |
tree | 40749d301fef81ad23f65c85df36f4f0ed63632a | |
parent | d59cd149b137b166b119fa3885d635e5a5bbcca7 (diff) | |
download | drakx-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.c | 19 |
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; |