Commit Graph

122 Commits

Author SHA1 Message Date
Denys Vlasenko
45f0a1156d mdev: trim overlong comments. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 04:55:47 +02:00
Denys Vlasenko
3eccd7ecbe mdev: don't reparse rules on -s
function                                             old     new   delta
make_device                                         1648    1843    +195
clean_up_cur_rule                                      -      61     +61
make_default_cur_rule                                  -      41     +41
mdev_main                                            690     712     +22
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 319/0)             Total: 319 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 03:46:30 +02:00
Denys Vlasenko
16714245f9 add INIT_G()'s. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-21 01:59:15 +02:00
Denys Vlasenko
5c6ba6c56f mdev: expand --help so that it's actually useful.
function                                             old     new   delta
packed_usage                                       28634   28822    +188

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-19 12:18:11 +02:00
Denys Vlasenko
4566e172eb simplify parsing of /etc/busybox.conf
function                                             old     new   delta
parse_config_file                                    799     667    -132

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-16 00:01:08 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +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
f2860bf6d3 mdev: fix non-working device deletion, add a test for that
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 14:26:15 +02:00
Denys Vlasenko
dd8adde386 *: introduce and use bb_unsetenv_and_free
function                                             old     new   delta
bb_unsetenv_and_free                                   -      17     +17
tcpudpsvd_main                                      1819    1810      -9
safe_setenv                                           58      47     -11
udhcp_run_script                                     630     616     -14
make_device                                         1683    1663     -20
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 17/-54)            Total: -37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-24 05:00:50 +02:00
Denys Vlasenko
b38af7bd31 mdev: add "!" syntax support
Based on the patch by Steve Bennett <steveb@workware.net.au>

function                                             old     new   delta
make_device                                         1640    1673     +33

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-02 06:47:14 +02:00
Denys Vlasenko
651a2697f7 *: merge some common strings
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-23 16:25:17 +01:00
Denys Vlasenko
8d4a8d195d mdev: fix a trivial SEGV
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-16 18:37:19 +01:00
Denys Vlasenko
64bb95a361 mdev: fix subsystem passing (new kernels broke it again) - bugs 639, 721.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-24 10:39:47 +01:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
1612c757d0 mdev: print line# in error messages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07 03:33:05 +01:00
Denys Vlasenko
e62a2463ec mdev: do not die on mknod errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-01 21:51:31 +01:00
Bernhard Reutner-Fischer
b04f058e76 mdev: adjust error message
function                                             old     new   delta
.rodata                                           126715  126706      -9

(reusing common error string)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 17:13:45 +01:00
Bernhard Reutner-Fischer
933993a461 mdev: handle string modes
parse ugoa=rwxXst via bb_parse_mode (+5b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 17:13:12 +01:00
Bernhard Reutner-Fischer
6531f0923b mdev: tiny shrinkage by index_in_strings
text	   data	    bss	    dec	    hex	filename
      2633	      0	      0	   2633	    a49	util-linux/mdev.o.old
      2624	      0	      0	   2624	    a40	util-linux/mdev.o

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 17:12:26 +01:00
Denys Vlasenko
5478aaf5b8 mdev: be more permissive on errors (dont die): mdev -s users want that
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-02 13:17:10 +02:00
Denys Vlasenko
90db359972 mdev: set $MDEV correctly for renamed nodes
function                                             old     new   delta
make_device                                         1467    1502     +35
build_alias                                           78       -     -78

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-02 13:07:11 +02:00
Denys Vlasenko
2f86ca1350 mdev: fix the case when move rule deletes node with name == device_name
Signed-off-by: Jean Wolter <jw5@os.inf.tu-dresden.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-22 01:31:12 +02:00
Denys Vlasenko
76f5e38c82 mdev: revert last wrong commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-04 21:59:05 +02:00
Denys Vlasenko
aa0a12d549 mdev: do not exit if user:group parse failed. closes bug 309.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-02 16:33:10 +02:00
Denys Vlasenko
05ae400830 mdev: fix a case where we mangle device_path string and then use it. 2009-05-01 03:09:54 +02:00
Denis Vlasenko
11c17f75a7 mdev: enlarge inline documentation 2009-04-19 23:38:08 +00:00
Denis Vlasenko
3798db58cf mdev: support $ENVVAR=regex 2009-04-19 21:37:07 +00:00
Denis Vlasenko
c7cc5a9432 mdev: Rob's #if forest removal
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
5ff9629b8f mdev: add large comment, fix a buglet with subsystem and /sys/block 2009-04-17 00:01:04 +00:00
Denis Vlasenko
3161b61199 mdev: set mode, needed when device node already exists. 2009-04-16 22:42:01 +00:00
Denis Vlasenko
6dda5dec23 mdev: change subsystem syntax from /subsystem to subsystem/devname 2009-04-16 21:42:12 +00:00
Denis Vlasenko
32a3d084d3 mdev: safer handling of $SUBSYSTEM in mdev -s 2009-04-14 21:23:33 +00:00
Denis Vlasenko
7f9593753a randomconfig fixes 2009-04-14 08:06:59 +00:00
Denis Vlasenko
f2b39e088d mdev: add support for - "dont stop here" char
function                                             old     new   delta
make_device                                         1340    1362     +22
packed_usage                                       26291   26299      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 30/0)               Total: 30 bytes
2009-04-13 23:18:52 +00:00
Denis Vlasenko
065c714791 mdev: provide $SUBSYSTEM (by Vladimir)
function                                             old     new   delta
make_device                                         1265    1340     +75
dirAction                                             14      60     +46
mdev_main                                            676     695     +19
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 140/0)             Total: 140 bytes
2009-04-13 22:23:02 +00:00
Denis Vlasenko
323cbbfaa2 mdev: fix a bug where \t is not treated as delimiter after [>|=PATH] 2009-04-13 13:59:26 +00:00
Denis Vlasenko
aafbae6181 mdev: make usage text more useful
function                                             old     new   delta
packed_usage                                       26235   26291     +56
2009-04-13 13:33:02 +00:00
Denis Vlasenko
1fb26da071 mdev: ignore events with "$SUBSYSTEM" == "firmware" && "$ACTION" == "remove"
function                                             old     new   delta
mdev_main                                            665     676     +11
2009-04-13 02:15:57 +00:00
Denis Vlasenko
f1df35c40b mdev: do not complain if /sys/block doesn't exist 2009-04-12 14:00:12 +00:00
Denis Vlasenko
d63cd1bf1c mdev: if /sys/class/block exists, don't scan /sys/block 2009-02-13 00:02:54 +00:00
Denis Vlasenko
319fe129a1 mdev: fix breakage caused by unified parser usage 2009-01-12 07:57:52 +00:00
Mike Frysinger
870ccd7212 do not whine if /sys/block does not exist ... embedded systems dont need stinkin block devices 2009-01-08 17:19:01 +00:00
Denis Vlasenko
76ddc2e3e4 libbb: add bb_unsetenv (taken from hush).
udhcpc: stop filtering environment passed to the script.
crond: fix uncovered potential bug (failing unsetenv)
mdev: fix uncovered potential bug (failing unsetenv)
tcp, udpsvd: fix uncovered potential bug (failing unsetenv)

function                                             old     new   delta
safe_setenv                                            -      58     +58
bb_unsetenv                                            -      55     +55
builtin_unset                                        139     138      -1
tcpudpsvd_main                                      1843    1830     -13
free_strings_and_unsetenv                             87      53     -34
udhcp_run_script                                    1186    1133     -53
safe_setenv4                                          62       -     -62
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/4 up/down: 113/-163)          Total: -50 bytes
2008-12-30 05:05:31 +00:00
Denis Vlasenko
9504e444b8 whitespace fixes, no code changes 2008-10-29 01:19:15 +00:00
Denis Vlasenko
8d89bed840 watchdog: add -T option
function                                             old     new   delta
 watchdog_main                                        159     219     +60
mdev: support match by major,minor. See bug 4714.
 +100 bytes.
2008-09-07 23:22:08 +00:00
Denis Vlasenko
084266ed52 fix several problems with config parser:
a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes
2008-07-26 23:08:31 +00:00
Denis Vlasenko
df96df9c7c mdev: do not complain if mdev.conf does not exist;
use #if to prevent gcc from generating dead code
 (sadly, it's more ugly this way)
2008-07-26 18:35:10 +00:00
Bernhard Reutner-Fischer
b62bd7b261 - unused variables if !ENABLE_FEATURE_MDEV_RENAME_REGEXP 2008-07-22 07:33:53 +00:00
Denis Vlasenko
2e157ddf9e libbb: updated config_parse() from Vladimir
function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes
2008-07-19 09:27:19 +00:00
Bernhard Reutner-Fischer
679212836a - fix segfault in nameif with mactab file
(by fixing and shrink config parser)

function                                             old     new   delta
config_free_data                                       -      37     +37
config_open                                           43      48      +5
pack_gzip                                           1658    1660      +2
nameif_main                                          527     525      -2
SynchronizeFile                                      629     623      -6
make_device                                         1184    1176      -8
config_close                                          31      18     -13
config_read                                          431     393     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67)            Total: -23 bytes
2008-07-17 11:59:13 +00:00