Commit Graph

46 Commits

Author SHA1 Message Date
Denys Vlasenko
72089cf6b4 config: deindent all help texts
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-21 09:50:55 +02:00
Denys Vlasenko
4eed2c6c50 Update menuconfig items with approximate applet sizes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18 22:01:24 +02:00
Denys Vlasenko
1f71014fd6 depmod: don't build it if MODPROBE_SMALL=y
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-01 13:12:48 +01:00
Denys Vlasenko
a1cd0d9849 modprobe-small: make applets individually selectable
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-23 15:13:16 +01:00
Denys Vlasenko
e32b64c4ec Convert all modutils/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23 07:54:52 +01:00
Timo Teräs
48dc80bbba modutils: merge module_entry and module_info to common
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-11-05 18:54:55 +01:00
Denys Vlasenko
8dff01d06a libbb: introduce and use is_prefixed_with()
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-03-12 17:48:34 +01:00
Denys Vlasenko
cc70b6f8b6 depmod: simple memory optimization
function                                             old     new   delta
filename2modname                                      67      86     +19
parse_module                                         374     351     -23

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-24 22:30:30 +01:00
Denys Vlasenko
08364dab75 depmod: fix recent breakage in modules.dep generation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-07 14:39:01 +01:00
Denys Vlasenko
6967578728 whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 01:34:48 +01:00
Lauri Kasanen
5a5db93b0f depmod: supply help text
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-19 16:33:37 +01:00
Denys Vlasenko
b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Pascal Bellard
cadf90184c depmod: accept and ignore -u, -q, -C FILE
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 00:51:16 +02:00
Denys Vlasenko
1a5e11c874 modutils/*: move help bits into corresponding .c files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-16 01:56:41 +02:00
Denys Vlasenko
c15613c975 modutils/*: move applet bits into corresponding *.c files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-15 11:29:02 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
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-08-16 20:14:46 +02:00
Denys Vlasenko
4cab7f3e63 depmod: generate "new-style" modules.dep with relative paths.
function                                             old     new   delta
parse_module                                         384     379      -5
depmod_main                                          590     559     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-36)             Total: -36 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-18 17:41:17 +02:00
Denys Vlasenko
b87c17cd16 *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anyway
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 15:15:24 +02:00
Denys Vlasenko
6b9f163353 *: style fixes. no code changes (verified with objdump)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 02:24:24 +01:00
Denys Vlasenko
043b1e5d99 more C standard compat fixes from Dan Fandrich
function                                             old     new   delta
docolon                                              207     204      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 12:47:55 +02:00
Denys Vlasenko
16bda3bd1f depmod: fix handling of .gz modules
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-18 13:08:04 +02:00
Ned Ludd
039ed437d3 make modutils compile again 2009-02-20 04:56:00 +00:00
Denis Vlasenko
a430b695a2 depmod: accept and ignore -r (Linux kernle build needs this) 2009-02-19 01:25:42 +00:00
Denis Vlasenko
35261159e6 depmod: fix -b option (by timo.teras AT iki.fi)
function                                             old     new   delta
xfreopen_write                                         -      35     +35
parse_module                                         346     353      +7
depmod_main                                          553     546      -7
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 42/-7)              Total: 35 bytes
2009-01-12 22:12:22 +00:00
Denis Vlasenko
fc66892abd *: remove superfluous casts. no code changes 2008-11-06 02:32:31 +00:00
Bernhard Reutner-Fischer
6c4dadefb6 - update my name. No obj-code changes ;) 2008-09-25 12:13:34 +00:00
Denis Vlasenko
ba1315d0fb modutils/*: rewrite by Timo Teras <timo.teras AT iki.fi>
- 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
2008-09-13 14:59:38 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
7049ff8696 whitespace fixes. no code changes 2008-06-25 09:53:17 +00:00
Denis Vlasenko
f45c4f41b7 whitespace and comment fixes, no code changes 2008-06-16 04:09:25 +00:00
Bernhard Reutner-Fischer
6075b2aee0 - add FIXME. Perhaps somebody is interrested in looking into this one.
We would try to be clever and compare the *data instead of the *elt.

Somethink like this might be of more general use:
/* Unlink arbitrary element from the list that contains data */
void llist_unlink_data(llist_t **head, void *data)
{
    llist_t *elt;

    for (elt = *head; elt; elt = elt->link) {
        if (elt->data == data) {
            llist_unlink(elt);
            return;
        }
    }
}
2008-06-02 19:23:47 +00:00
Bernhard Reutner-Fischer
c2741e1f72 - add alias support 2008-06-02 18:59:16 +00:00
Bernhard Reutner-Fischer
ef729dd90c - revert revision 22183 since it breaks -b /abs /abs/path/to/mod.ko 2008-06-02 13:40:13 +00:00
Bernhard Reutner-Fischer
d42816763f - just chdir to the basedir (-30b). 2008-06-02 13:34:36 +00:00
Bernhard Reutner-Fischer
beac1bd58e - optional fancy pruning-mode for depmod 2008-06-02 13:28:47 +00:00
Bernhard Reutner-Fischer
634b022108 - misc. improvements and shrinkage 2008-05-28 14:20:20 +00:00
Bernhard Reutner-Fischer
c21d9c7290 - the moddir_base is supposed to be omitted frmo the .dep file
- other tweaks while at it
2008-05-28 10:35:51 +00:00
Bernhard Reutner-Fischer
b85fb693c1 - Add config option for DEFAULT_DEPMOD_FILE and DEFAULT_DEPMOD_FILE.
No obj-code changes.
2008-05-27 10:55:34 +00:00
Bernhard Reutner-Fischer
1ea2568469 - improve option-handling a bit 2008-05-26 21:33:05 +00:00
Bernhard Reutner-Fischer
6bb55cfb99 - add basic option-handling (+220b). Untested 2008-05-26 17:04:01 +00:00
Bernhard Reutner-Fischer
cf18010ca9 - use mmap instead of allocating hundreds of megabytes of RAM. +39b 2008-05-26 15:12:01 +00:00
Bernhard Reutner-Fischer
dc5d7fec35 - remove some bloat -28b: now approx. 501b 2008-05-26 13:30:41 +00:00
Bernhard Reutner-Fischer
423465cd5e - switch to FILE base writer and remove now unneeded stuff. -50b 2008-05-26 12:19:35 +00:00
Bernhard Reutner-Fischer
55e547eb6f - add simple first-draft unoptimized depmod just to proove Vladimir Dronnikov wrong
text	   data	    bss	    dec	    hex	filename
    569	      0	      0	    569	    239	modutils/depmod.o
2008-05-26 12:01:49 +00:00