Age | Commit message (Collapse) | Author |
|
Also expanded comments in recursive_action.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
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>
|
|
function old new delta
recursive_action 425 465 +40
find_main 436 465 +29
test_main 247 253 +6
need_print 1 - -1
doCommands 2523 2521 -2
compare_keys 737 735 -2
xdev_dev 4 - -4
xdev_count 4 - -4
recurse_flags 4 - -4
mkfs_vfat_main 1609 1605 -4
actions 4 - -4
fileAction 588 583 -5
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 3/4 up/down: 75/-30) Total: 45 bytes
text data bss dec hex filename
822711 450 7684 830845 cad7d busybox_old
822773 445 7668 830886 cada6 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Without FEATURE_NETSTAT_PRG:
function old new delta
recursive_action 416 425 +9
tcp_do_one 420 428 +8
udp_do_one 492 499 +7
raw_do_one 472 479 +7
expand 1697 1701 +4
netstat_main 489 492 +3
unix_do_one 486 488 +2
flags 1 - -1
qgravechar 109 106 -3
net_conn_line 4 - -4
bbunpack 391 383 -8
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 7/2 up/down: 40/-16) Total: 24 bytes
With FEATURE_NETSTAT_PRG:
file_act - 213 +213
dir_act - 192 +192
netstat_main 489 601 +112
prg_cache_get - 50 +50
tcp_do_one 420 462 +42
udp_do_one 492 533 +41
raw_do_one 472 513 +41
unix_do_one 486 519 +33
recursive_action 416 425 +9
expand 1697 1701 +4
flags 1 - -1
qgravechar 109 106 -3
net_conn_line 4 - -4
bbunpack 391 383 -8
packed_usage 24586 24572 -14
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 7/3 up/down: 737/-30) Total: 707 bytes
|
|
|
|
|
|
15kb smaller than standard one.
libbb/recursive_action.c: commented-out code for aborting the scan.
|
|
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
|
|
open_transformer: don't leak compressed descriptor anymore
recursive_action: tiny shrink
|
|
function old new delta
procps_scan 1265 1298 +33
aliascmd 278 283 +5
parse_file_cmd 116 120 +4
dname_enc 373 377 +4
setcmd 90 93 +3
execcmd 57 60 +3
count_lines 72 74 +2
process_command_subs 340 339 -1
test_main 409 407 -2
mknod_main 179 177 -2
handle_incoming_and_exit 2653 2651 -2
argstr 1312 1310 -2
shiftcmd 131 128 -3
exitcmd 46 43 -3
dotcmd 297 294 -3
breakcmd 86 83 -3
evalpipe 353 349 -4
evalcommand 1180 1176 -4
evalcmd 109 105 -4
send_tree 374 369 -5
mkfifo_main 82 77 -5
evalsubshell 152 147 -5
typecmd 75 69 -6
letcmd 61 55 -6
add_cmd 1190 1183 -7
main 891 883 -8
ash_main 1415 1407 -8
parse_stream 1377 1367 -10
alloc_procps_scan 55 - -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes
text data bss dec hex filename
797195 658 7428 805281 c49a1 busybox_old
797101 658 7428 805187 c4943 busybox_unstripped
|
|
263 bytes saved.
|
|
chown/chgrp: completely match coreutils 6.8 wrt symlink handling
function old new delta
recursive_action 411 422 +11
arith 2033 2042 +9
collect_blk 467 474 +7
dhcprelay_main 1122 1125 +3
fsck_main 1909 1911 +2
singlemount 4555 4547 -8
xmalloc_realpath 14 - -14
get_lcm 123 105 -18
ed_main 3111 3084 -27
chown_main 217 183 -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/4 up/down: 32/-101) Total: -69 bytes
text data bss dec hex filename
684132 2744 14000 700876 ab1cc busybox_old
684060 2744 14000 700804 ab184 busybox_unstripped
|
|
recursive_actions: uppercase flag constants
|
|
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
|
|
|
|
|
|
(we were not respecting order of actions!).
Add -o and -a handling.
|
|
chmod: match coreutils versus following links
|
|
|
|
|
|
(was doing zillions of 1-byte write syscalls)
|
|
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
|
|
- use shorter boilerplate while at it
|
|
text data bss dec hex filename
889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig
889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2
889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig
888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
|
|
Hi.
Last changes (rev 1.12) to recursive_actions() by Christian Grigis
have problem.
Test for demonstrate:
$ mkdir aaa bbb ccc
$ su
# chown root bbb
# chmod 700 bbb
# exit
$ busybox chmod 777 -R .
./bbb: Permision denied
But "./ccc" mode not changed. Previous variant works fine,
errors skiped and continued recursion.
--w
vodz
|
|
Hello everyone,
Busybox's insmod fails to locate a module when that module is the only one
existing in the /lib/modules directory (with a unique name).
Example:
# find /lib/modules/ -type f
/lib/modules/kernel/drivers/char/bios.o
# insmod bios
insmod: bios.o: no module by that name found
# touch /lib/modules/dummy
# find /lib/modules/ -type f
/lib/modules/kernel/drivers/char/bios.o
/lib/modules/dummy
# insmod bios
Using /lib/modules/kernel/drivers/char/bios.o
As long as there is another file in the /lib/modules directory, insmod
finds it OK.
I tracked the problem down to 'check_module_name_match()' in insmod.c:
It returns TRUE when a match is found, and FALSE otherwise. In the case
where there is only one module in the /lib/modules directory (or more that
one module, but all with the same name), 'recursive_action()' will return
TRUE and we end up on line 4196 in 'insmod.c' which returns an error.
[The reason it works with more than one module with different
names is that in this case there will always be one not matching,
'recursive_action()' will return FALSE and we end up in line 4189.]
Now, from the implementation of 'recursive_action()' and from other
usages of it (tar.c, etc.), it seems to me that FALSE should be returned
to indicate that we want to stop the recursion, so TRUE and FALSE should
be inverted in 'check_module_name_match()'.
At the same time, 'recursive_action()' continues to recurse even after
the recursive call has returned FALSE; again in my understanding and
other usages of it, we can safely stop recursing at this point.
Here is my patch against 1.00-pre8:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Erik
|
|
This way, we can new get rid of all that tedious #define rubbish we used to
need to enable specific messages. This way is enormously simpler, and as a
bonus also ends up saving us 96 bytes.
-Erik
|
|
is (as the name implies) is recursive, reducing stack memory usage
is important to avoid exhausting available stack memory.
|
|
cleans up most of the now-revealed problems.
|
|
files. Clean up the resulting damage and fix up the makefile.
-Erik
|