aboutsummaryrefslogtreecommitdiff
path: root/modutils/rmmod.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build system: drop PLATFORM_LINUXRon Yorston2020-08-131-1/+0
| | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modutils: make them NOEXEC except depmodDenys Vlasenko2017-08-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-1/+1
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make RMMOD=y by defaultDenys Vlasenko2016-12-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe-small: make applets individually selectableDenys Vlasenko2016-12-231-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all modutils/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rmmod: fix bad error messageDenys Vlasenko2015-10-241-5/+7
| | | | | | | | | | | | | | | | | | | | | 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>
* whitespace cleanup. no code changesDenys Vlasenko2013-01-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko2011-01-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanupDenys Vlasenko2010-10-291-2/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* modutils/*: move help bits into corresponding .c filesDenys Vlasenko2010-10-161-0/+13
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* modutils/*: move applet bits into corresponding *.c filesDenys Vlasenko2010-10-151-0/+2
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* rmmod: fix bug 263Denis Vlasenko2009-04-131-4/+10
| | | | | | | | "modutils/rmmod can't remove modules with dash in name on 2.4 kernels" function old new delta rmmod_main 187 220 +33
* modutils/*: rewrite by Timo Teras <timo.teras AT iki.fi>Denis Vlasenko2008-09-131-70/+17
| | | | | | | | | | | | | | | - a lot faster (linear algorithmic complexity, smaller memory foot print) - a lot smaller (the old code was overly complicated) - loading of aliases is now module-init-tools compliant - blacklisting is done correctly (-b option added) - module argument quoting done right - depmod now correctly generates modules.symbols and modules.alias add/remove: 16/21 grow/shrink: 4/6 up/down: 6930/-9316 Total: -2386 bytes text data bss dec hex filename 806039 592 6680 813311 c68ff busybox_old 803498 592 6676 810766 c5f0e busybox_unstripped
* hush: add #defines to switch off break/continue if loops are not supportedDenis Vlasenko2008-07-291-1/+1
| | | | | | *: remove a few inline keywords no code changes
* - use (uC)libc functions. Saves a dozen bytes.Bernhard Reutner-Fischer2008-05-271-3/+9
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-1/+1
| | | | | 263 bytes saved.
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* s/#ifdef CONFIG_/#if ENABLE_/gDenis Vlasenko2007-08-131-1/+1
|
* introduce and use bb_basename()Denis Vlasenko2007-06-301-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_basename - 26 +26 sv_main 1226 1225 -1 passwd_main 1985 1983 -2 showdirs 482 478 -4 sendCgi 1811 1807 -4 make_device 1354 1350 -4 handleIncoming 2443 2439 -4 func_name 82 78 -4 service_name 2292 2285 -7 main 909 901 -8 cmp_main 555 547 -8 test_main 434 422 -12 act 228 216 -12 find_pair 180 164 -16 rmmod_main 298 280 -18 find_pid_by_name 156 134 -22 modprobe_main 1606 1576 -30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes text data bss dec hex filename 734933 3028 14400 752361 b7ae9 busybox_old 734801 3028 14400 752229 b7a65 busybox_unstripped
* Audit bb_common_bufsiz usage, add script which looks for misuse.Denis Vlasenko2007-06-041-3/+5
| | | | | | tr: stop using globals needlessly. code: -103 bytes
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* style fixes. No code changesDenis Vlasenko2007-04-121-3/+3
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* style cleanup: return(a) -> return a, part 1Denis Vlasenko2006-11-271-3/+3
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-1/+1
| | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
* whitespace cleanupDenis Vlasenko2006-09-171-1/+1
|
* No real need for my_query_module() and this eliminates some type-punnedRob Landley2006-08-281-38/+25
| | | | pointer warning on certain gcc versions (and saves 38 bytes).
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-031-15/+2
| | | | | | and eventual platform specific includes in early. - remove two supposedly superfluous newlines from ...error_msg() in modprobe and use shorter boilerplate while at it.
* - single KERNEL_VERSION(a,b,c) macro in platform.hBernhard Reutner-Fischer2006-05-191-1/+1
| | | | | - rename get_kernel_revision() to get_linux_version_code from Robert P. J. Day
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* just whitespaceTim Riker2006-01-251-3/+3
|
* Patch from Yann E. Morin to make rmmod report failure properly.Rob Landley2005-12-111-2/+2
|
* use libbb/get_kernel_revision(), reduce stack usage, add loses -w -f option ↵"Vladimir N. Oleynik"2005-11-281-60/+48
| | | | for getopt, convert to bb_getopt_ulflags(), reduce memory usage - xmalloc to bb_common_bufsiz1, size reduce over 200 bytes
* Patch from Cristian Ionescu-Idbohrn to deal with _ vs - better.Rob Landley2005-11-271-1/+11
|
* Patch from Mike Snitzer <snitzer@gmail.com>:Robert Griebl2004-07-201-3/+3
| | | | | Please see the attached patch for the following crash with busybox' 2.6 rmmod support
* Deal with the fact that 2.6.x kernels replace any '-'s in theEric Andersen2004-07-201-4/+36
| | | | | module name with a '_'. -Erik
* Fixup some cases of "QM_MODULES: not implemented" for bothEric Andersen2004-07-131-3/+12
| | | | | lsmod and rmmod when using 2.6.x module support -Erik
* As noted in a patch from Kendrick Hamilton, rmmod was onlyEric Andersen2004-03-191-4/+1
| | | | | half way converted, and still used the old delete_module(), call rather than a syscall, in one spot.
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-3/+3
|
* re-indentEric Andersen2003-12-241-1/+1
|
* Update modutils with 2.6 module supportEric Andersen2003-12-111-1/+10
|
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Major coreutils update.Manuel Novoa III2003-03-191-5/+5
|