Previously a 640x480 PPM on an e.g. 720x400 console would just segfault when
reading the lines. While this bug should perhaps be fixed to handle such cases
properly we just exit gracefully until somebody is willing to take care of it
properly.
This is the result after converting mtd-utils' flash_eraseall to BB.
The functionality given by this patch almost the same except that this
one does not support long options.
I needed this tool a system which does not have a lot of flash for RFS
and merging this into BB as the only way out.
[bigeasy@]$ ./scripts/bloat-o-meter bb_wo_fl bb_w_fl
function old new delta
flash_eraseall_main - 1072 +1072
show_progress - 62 +62
packed_usage 25156 25176 +20
applet_names 1958 1973 +15
applet_main 2352 2360 +8
target_endian - 4 +4
applet_nameofs 588 590 +2
applet_install_loc 147 148 +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 5/0 up/down: 1184/0) Total: 1184 bytes
[bigeasy@]$ size miscutils/flash_eraseall.o
text data bss dec hex filename
1586 4 0 1590 636 miscutils/flash_eraseall.o
Signed-off-by: Benedigt Spranger <b.spranger@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Kill config options by making them always on:
FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES
This makes httpd.c remotely readable - it had ~125 #ifdefs, now it has ~100.
The growth on a .config with all FEATURE_HTTPDs off is:
function old new delta
send_file_and_exit - 269 +269
parse_conf 683 763 +80
free_llist - 32 +32
httpd_main 427 454 +27
sighup_handler - 15 +15
handle_incoming_and_exit 1110 905 -205
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 2/1 up/down: 423/-205) Total: 218 bytes
without it, determination of remaining lease time is unreliable.
Yes, it's costly in code size, but without it, dumpleases output
is misleading!
function old new delta
read_leases 143 282 +139
dumpleases_main 447 572 +125
write_leases 193 233 +40
hton64 29 58 +29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 333/0) Total: 333 bytes
remove unreachanble code
build system: correct some dependencies in config system
init: convert one #if into if() - for Rob.
function old new delta
obj_string_patch 136 129 -7
bb_init_module_24 4759 4615 -144
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-151) Total: -151 bytes
Lots of nasty, but hard to trip, races are fixed.
text data bss dec hex filename
1038828 924 10932 1050684 10083c busybox_old
1038787 924 10932 1050643 100813 busybox_unstripped