aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
AgeCommit message (Collapse)Author
2017-08-04modutils: make them NOEXEC except depmodDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21config: deindent all help textsDenys Vlasenko
Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18Update menuconfig items with approximate applet sizesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-06modprobe: do not descend into /etc/modprobe.d/DIR/. Closes 8686Denys Vlasenko
Also expanded comments in recursive_action.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-06modprobe: read modules.builtinBen Hutchings
This allows explicit probing to succeed when the requested module is actually built-in, and corrects the error message for removal. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01cmdline module options can be disabled on "big" modutilsKang-Che Sung
Allow module options on command line to be disabled on "big" modutils. Config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is renamed to FEATURE_CMDLINE_MODULE_OPTIONS and no longer depends on !MODPROBE_SMALL (I'm not sure if disabling this is useful on "big" modutils, but at least the macro can serve as a marker and ensure both implementations of same feature have consistent behavior.) Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-02-01modutils: remove redundant "select PLATFORM_LINUX" configsKang-Che Sung
It is enough to have only applets' configs select PLATFORM_LINUX. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-23modprobe-small: make applets individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all modutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-03-29modprobe: skip non-.conf files only in subdirectoriesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-02-12modprobe: only parse files that end in .confMike Frysinger
This matches behavior with kmod which has been the standard for a long time at this point. URL: https://bugs.busybox.net/8021 Reported-by: Jö <jorrit@jorrit.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-11-05modutils: merge module_entry and module_info to commonTimo Teräs
This merges the in-memory module info structures of modprobe and depmod. This allows sharing hashing by modulename code improving depmod runtime with almost factor of 2x. function old new delta get_or_add_modentry - 17 +17 do_modprobe 590 601 +11 moddb_get_or_create - 10 +10 load_modules_dep 195 205 +10 moddb_get - 7 +7 add_probe 81 78 -3 modprobe_main 721 714 -7 depmod_main 553 543 -10 config_file_action 434 421 -13 helper_get_module 160 144 -16 parse_module 343 320 -23 order_dep_list 105 82 -23 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/7 up/down: 55/-95) Total: -40 bytes Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-24reuse a stringDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-24rmmod: fix bad error messageDenys Vlasenko
Before: ># busybox_old rmmod gtrhfhdfghdf rmmod: can't unload 'gtrhfhdfghdf': unknown symbol in module, or unknown parameter After: ># busybox rmmod gtrhfhdfghdf rmmod: can't unload module 'gtrhfhdfghdf': No such file or directory function old new delta modprobe_main 726 721 -5 do_modprobe 599 590 -9 rmmod_main 187 169 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-32) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-09-09modprobe: handle module arguments containing spacesPeter Korsgaard
Modprobe wasn't correctly parsing module arguments containing spaces from /proc/cmdline - E.G. module.property="some text". Extend the parsing to correctly handle quoted text. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-12libbb: introduce and use is_prefixed_with()Denys Vlasenko
function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-19modprobe: fix modprobe -r and parsing of /etc/modprobe.dNatanael Copa
This fixes a regression introduced with commit 78854520 (modprobe: revert checking for /, stop doing basename() on modprobe args, 2015-01-01) that broke modprobe options stored in /etc/modprobe.conf and /etc/modprobe.d/*.conf. This also fixes modprobe -r Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-15modprobe: fix "modprobe devname:snd/timer" case (alias with a slash)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-15modprobe: fix recent breakage: modules.dep reading code needs to strip dirnameDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-01modprobe: revert checking for /, stop doing basename() on modprobe argsDenys Vlasenko
function old new delta process_module 726 719 -7 filename2modname 81 67 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-21) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-20modprobe,rmmod: reject module names with slashesDenys Vlasenko
function old new delta add_probe 86 113 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-19modprobe-small: fix help messages for aliased module-related appletsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30Whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-31modprobe: accept -b even if blacklist functionality is disabledFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20modprobe: use hash table. speeds up significantly if modprobe.dep is largeTimo Teras
function old new delta helper_get_module 106 157 +51 config_file_action 413 431 +18 modprobe_main 690 706 +16 do_modprobe 580 588 +8 add_probe 81 83 +2 load_modules_dep 192 190 -2 get_or_add_modentry 10 - -10 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 5/1 up/down: 95/-12) Total: 83 bytes Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-15modprobe: fix "modprobe -l name-with-dash"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02modprobe/insmod: fix parameter quotingDenys Vlasenko
function old new delta parse_cmdline_module_options 102 157 +55 modprobe_main 657 662 +5 insmod_main 68 70 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 62/0) Total: 62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-28modprobe: add -D option (synonym of --show-depends)Serj Kalichev
The modern module-init-tools 3.12 has "-D" option and it works. The --show-depends and -a options can be used together due to upstream modprobe behaviour. function old new delta do_modprobe 536 579 +43 packed_usage 28035 28042 +7 modprobe_main 653 657 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 54/0) Total: 54 bytes Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-26modprobe: add support for --show-dependsSerj Kalichev
function old new delta modprobe_longopts - 16 +16 packed_usage 28018 28028 +10 modprobe_main 648 653 +5 do_modprobe 580 536 -44 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 31/-44) Total: -13 bytes Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-15modutils/*: move applet bits into corresponding *.c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-10Modprobe: Make -l open the right fileLauri Kasanen
Before: modprobe -l modules.dep not found No size change, just moved the chdir. Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07modprobe: add support for -l and -s. Remove some unsupported optionsPascal Bellard
Fixed some goofs in help text function old new delta modprobe_main 494 653 +159 packed_usage 27129 27145 +16 insmod_main 98 95 -3 Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23*: merge some common stringsDenys Vlasenko
text data bss dec hexfilename 838650 8009 0 846659 ceb43busybox_old 838519 8009 0 846528 ceac0busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-03modprobe: remove 2k limit on /proc/cmdlineDenys Vlasenko
function old new delta do_modprobe 365 520 +155 parse_and_add_kcmdline_module_options 149 - -149 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-27modprobe: pick up module options from /proc/cmdline tooDenys Vlasenko
Based on patch by Ozan Çağlayan (ozan AT pardus.org.tr) function old new delta parse_and_add_kcmdline_module_options - 149 +149 do_modprobe 357 365 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04*: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-26modprobe: protect against possible SEGVDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-10modprobe: it's not an error if module is already loaded. Closes bug 833Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-11tidy up O_NONBLOCK usage. use libbb functions in stty.Denys Vlasenko
Added O_RDONLY where improves readability. Note: O_RDONLY == 0, so it is there even if not specified. function old new delta stty_main 1289 1235 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-14modprobe: treat tabs in modules.dep as delimiters too. closes bug 567Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17modprobe: do not use ->probed_name blidlyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17modprobe: correct exitcode handling and error messages with respect to -qDenys Vlasenko
function old new delta do_modprobe 319 339 +20 bb_delete_module 10 26 +16 moderror 62 71 +9 bb_init_module 112 119 +7 modprobe_main 488 494 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 58/0) Total: 58 bytes Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28modprobe: fix more bugs in modprobe -rDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-26modprobe: fix modprobe -r. closes bug 315Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-06modprobe: add comment about expected modules.dep formatMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-05modprobe: add more useful debug pointsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>