Commit Graph

1164 Commits

Author SHA1 Message Date
Denis Vlasenko
56ea65ca5f ps: fix overflow in USER and VSZ columns
function                                             old     new   delta
smart_ulltoa4                                          -     280    +280
smart_ulltoa5                                        283     408    +125
ulltoa6_and_space                                      -      25     +25
scale                                                 28      38     +10
bbunpack                                             358     366      +8
ps_main                                              259     261      +2
glob3                                                 35      37      +2
fill_bounds                                          172     174      +2
process_stdin                                        456     446     -10
smart_ulltoa6                                        406       -    -406
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 6/1 up/down: 454/-416)           Total: 38 bytes
2008-01-06 03:26:53 +00:00
Denis Vlasenko
5fee2e1a79 ps: add conditional support for -o [e]time 2008-01-05 03:26:41 +00:00
Denis Vlasenko
fb0eba706c libbb: introduce and use safe_waitpid (loops in EINTR)
*: use more approproate (shorter) versions of wait()

function                                             old     new   delta
safe_waitpid                                           -      48     +48
wait_any_nohang                                        -      17     +17
send_tree                                            365     369      +4
processorstop                                        432     435      +3
text_yank                                            110     108      -2
make_human_readable_str                              202     200      -2
crond_main                                          1368    1366      -2
handle_sigchld                                        49      43      -6
reapchild                                            166     159      -7
custom                                               260     250     -10
checkscript                                          191     177     -14
wait_nohang                                           17       -     -17
wait_pid                                              43       -     -43
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103)           Total: -31 bytes
2008-01-02 19:55:04 +00:00
Denis Vlasenko
27963980db adding libbb/printable.c 2007-12-30 20:13:39 +00:00
Denis Vlasenko
d3c042fc60 libbb: introduce fputc_printable (from ed)
netstat: print control chars as ^C etc
vi: style fixlet

function                                             old     new   delta
fputc_printable                                        -     100    +100
unix_do_one                                          451     487     +36
printLines                                           258     190     -68
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 136/-68)            Total: 68 bytes
2007-12-30 01:59:53 +00:00
Denis Vlasenko
abee3d0e0d Fix xmalloc_fgets_str so that it really does NOT strip terminator.
Add xmalloc_fgetline_str which does strip terminator,
and use it in dpkg instead of xmalloc_fgets_str.
netstat: use xmalloc_fgets_str - allows to eat strings with NULs
(this fixes bug with some weird /proc/net/unix input)

function                                             old     new   delta
xmalloc_fgets_internal                                 -     191    +191
xmalloc_fgetline_str                                   -      18     +18
do_info                                              116     120      +4
unix_do_one                                          451     447      -4
tcp_do_one                                           423     419      -4
send_tree                                            369     365      -4
xmalloc_fgets_str                                    178      15    -163
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175)           Total: 38 bytes
   text    data     bss     dec     hex filename
 778445     832    7344  786621   c00bd busybox_old
 778483     832    7344  786659   c00e3 busybox_unstripped
2007-12-26 20:44:45 +00:00
Denis Vlasenko
f7be20e70c nameif: extended matching (Nico Erfurth <masta@perlgolf.de>)
*: whitespace fixes

function                                             old     new   delta
prepend_new_eth_table                                  -     304    +304
nameif_main                                          620     684     +64
cc_macaddr                                            51       -     -51
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 368/-51)           Total: 317 bytes
2007-12-24 14:09:19 +00:00
Denis Vlasenko
fcfb5c04bb defconfig: update
appletli.c: add vda's (C)
top: fixlet for incorrect display of "0"
Makefile: reduce stack size from 20k to 16k
2007-12-24 12:16:24 +00:00
Denis Vlasenko
94e3365b8f perror_nomsg: don't print extra colon
losetup: print name of loop device in error messages
2007-12-22 15:44:23 +00:00
Denis Vlasenko
2cd4a747e5 num conversions: allow for leading '+' (renice needs that) 2007-12-11 13:15:11 +00:00
Denis Vlasenko
9cb220be9d lineedit: don't violate API if we do simple fgets
ash: cosmetic style fixes, no code changes
2007-12-09 10:03:28 +00:00
Denis Vlasenko
b851c42a14 signal names hack was wrong, it broke "get signal name" function.
Reverting :(
2007-12-04 21:44:52 +00:00
Denis Vlasenko
c689fcfdb0 Make signal table a bit smaller
get_signum                                           136     151     +15
signals                                              224     192     -32
2007-12-04 10:20:48 +00:00
Denis Vlasenko
5f934b0785 guard against SIGxxx >= 32 (no code changes on i386) 2007-12-04 10:05:28 +00:00
Denis Vlasenko
7221c8c22d lineedit: reduce stack usage
netstat: reduce stack usage; fix handling of NULs in unix socket filenames

static.has_inode                                       1       -      -1
do_info                                              119     116      -3
deinit_S                                              60      51      -9
unix_do_one                                          578     451    -127
parse_and_put_prompt                                 966     825    -141
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-281)           Total: -281 bytes
2007-12-03 10:45:14 +00:00
Denis Vlasenko
8003e266ed explain why we use mmap instead of malloc 2007-12-02 07:18:29 +00:00
Denis Vlasenko
4c13922961 Introduce FEATURE_COPYBUF_KB.
People who want smaller stack at any cost may use it
to reduce cp's stack usage (FEATURE_COPYBUF_KB=1).
Desktop people may get faster copy of big files
(FEATURE_COPYBUF_KB=32 is ~30% faster than 4kb)
2007-12-02 03:27:42 +00:00
Denis Vlasenko
6672c8e480 test: stop using lots of bss.
function                                             old     new   delta
test_main                                            425     456     +31
t_lex                                                 69      73      +4
syntax                                               100     104      +4
ptr_to_statics                                         8      12      +4
t_wp_op                                                4       -      -4
t_wp                                                   4       -      -4
ngroups                                                4       -      -4
group_array                                            4       -      -4
binop                                                590     585      -5
oexpr                                                104      97      -7
aexpr                                                101      94      -7
nexpr                                                831     820     -11
leaving                                              156       -    -156
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 4/4 up/down: 43/-202)          Total: -159 bytes
   text    data     bss     dec     hex filename
 775098     929    9084  785111   bfad7 busybox_old
 775107     933    8908  784948   bfa34 busybox_unstripped
2007-11-30 07:29:05 +00:00
Denis Vlasenko
745cd17926 Further optimize applet tables; prettify build output
text    data     bss     dec     hex filename
 775923     929    9100  785952   bfe20 busybox_old
 775565     929    9100  785594   bfcba busybox_unstripped
2007-11-29 03:31:20 +00:00
Denis Vlasenko
1aa7e477b1 reorganize applet table. Eliminates pointers to names.
Should be a big win for libbusybox. busybox wins too:

   text    data     bss     dec     hex filename
 776524     929    9100  786553   c0079 busybox_old
 775903     929    9100  785932   bfe0c busybox_unstripped
2007-11-28 06:49:03 +00:00
Denis Vlasenko
6446c2d4ab which: fix testsuite failure
pidof: do not output empty line if nothing found
testsuite: disable false positive
2007-11-25 04:54:13 +00:00
Denis Vlasenko
9d6c46955f Introduce FEATURE_PREFER_IPV4_ADDRESS. If selected, we have:
function                                             old     new   delta
str2sockaddr                                         328     344     +16
2007-11-14 10:18:33 +00:00
Denis Vlasenko
73cb1fdfea lineedit: stop using both data/bss and tons of stack.
stack usage was ~10 kb!
unfortunately, noticeable code size growth:
   text    data     bss     dec     hex filename
   9252      12     181    9445    24e5 busybox.t7/libbb/lineedit.o
   9714       4       0    9718    25f6 busybox.t8/libbb/lineedit.o
2007-11-10 01:35:47 +00:00
Denis Vlasenko
d031b203c7 syslogd: support "symlink to symlink" for /dev/log; reduce stack usage
function                                             old     new   delta
create_socket                                          -     134    +134
syslogd_main                                        1132     865    -267
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 134/-267)         Total: -133 bytes
   text    data     bss     dec     hex filename
 775603     974    9420  785997   bfe4d busybox_old
 775445     974    9420  785839   bfdaf busybox_unstripped
2007-11-10 01:28:19 +00:00
Bernhard Reutner-Fischer
9bd8d0c23e - commentary fixes
- use common exit sequence for failure path:
   text	   data	    bss	    dec	    hex	filename
    308	      0	      0	    308	    134	libbb/xreadlink.o.pgf
    296	      0	      0	    296	    128	libbb/xreadlink.o
2007-11-08 21:11:43 +00:00
Paul Fox
599bbfbd9b xmalloc_follow_symlinks() -- fix ELOOP issue with absolute paths,
return full path in cases where path doesn't resolve to a link. 
change name to better differentiate from xmalloc_readlink().
2007-11-08 20:00:36 +00:00
Denis Vlasenko
abbd363261 xreadlink: code shrink
udhcp: add missing tryagain member to client_config

function                                             old     new   delta
xmalloc_readlink_follow                              169     154     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-15)             Total: -15 bytes
2007-11-08 17:40:23 +00:00
Paul Fox
53bd4015aa follow symlinks to find the true passwd file before updating. 2007-11-08 01:12:38 +00:00
Paul Fox
459a2ba1ef new xmalloc_readlink_follow() routine to fully expand trailing symlinks
to get to a "real" file (or directory).
2007-11-08 01:11:41 +00:00
Denis Vlasenko
5281630229 login: clear dangerous environment variables if started by non-root 2007-11-06 05:26:51 +00:00
Denis Vlasenko
6bef3d1d22 fbset: fix buglet where we were using wrong pointer
readahead: stop using stdio.h
*: style fixes
2007-11-06 03:05:54 +00:00
Denis Vlasenko
bfc3d82256 ifconfig: code shrink
adjtimex: code shrink
libbb: move nth_string function into libbb
hdparm: nth_string was here

   text    data     bss     dec     hex filename
 730013   10334   12032  752379   b7afb busybox_old
 730093   10134   12032  752259   b7a83 busybox_unstripped
2007-11-04 04:10:17 +00:00
Denis Vlasenko
b68979aefa insmod: code shrink, stop exporting insmod_ng_main.
function                                             old     new   delta
add_ksymoops_symbols                                   -     421    +421
static.section_names                                  20      40     +20
lsmod_main                                           425     424      -1
set_tainted                                          153     150      -3
main_opts                                              4       -      -4
obj_symbol_patch                                      47      42      -5
obj_string_patch                                     144     139      -5
already_loaded                                       144     138      -6
check_dep                                            348     341      -7
append_option                                         75      68      -7
obj_allocate_commons                                 515     501     -14
new_process_module_arguments                        1039    1018     -21
arch_new_symbol                                       31       9     -22
check_module_name_match                               85      61     -24
obj_create_alloced_section                           164     136     -28
include_conf                                         930     902     -28
modprobe_main                                       1643    1535    -108
obj_load                                             924     777    -147
insmod_ng_main                                       245       -    -245
insmod_main                                         4122    3794    -328
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 1/16 up/down: 441/-1003)       Total: -562 bytes
   text    data     bss     dec     hex filename
 776020     974    9420  786414   bffee busybox_old
 775384     974    9420  785778   bfd72 busybox_unstripped
2007-11-02 23:31:10 +00:00
Denis Vlasenko
15ca51e3e2 appletlib.c: make it actally follow _BB_SUID_ALWAYS rules
adduser: implement -S and code shrink / fix uid selection
*: sanitize getspnam_r use

   text    data     bss     dec     hex filename
 777042     974    9676  787692   c04ec busybox_old
 776883     974    9676  787533   c044d busybox_unstripped
2007-10-29 19:25:45 +00:00
Denis Vlasenko
5a28a25b9d syscall: code shrink
text    data     bss     dec     hex filename
 777209     974    9676  787859   c0593 busybox_old
 777042     974    9676  787692   c04ec busybox_unstripped
2007-10-29 19:22:13 +00:00
Denis Vlasenko
e5387a0574 bb_askpass: handle Ctrl-C, restore termoios on Ctrl-C.
sulogin: remove alarm handling, as it is redundant there.
code shrink. After all differences cancel out:

   text    data     bss     dec     hex filename
 777543    1000    9532  788075   c066b busybox_old
 777543    1000    9532  788075   c066b busybox_unstripped
2007-10-20 19:20:22 +00:00
Denis Vlasenko
037576d77b read_line_input: fix it to not do any fancy editing if echoing is disabled.
ash: make read handling both more correct and smaller

read_line_input                                     4037    4101     +64
input_backward                                       140     139      -1
readcmd                                             1079    1070      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 65/-10)             Total: 54 bytes
   text    data     bss     dec     hex filename
 777575    1000    9532  788107   c068b busybox_old
 777629    1000    9532  788161   c06c1 busybox_unstripped
2007-10-20 18:30:38 +00:00
Denis Vlasenko
2edbc2ab85 ping: fix breakage from -I fix
passwd: SELinux support by KaiGai Kohei <kaigai@ak.jp.nec.com>
2007-10-20 02:00:49 +00:00
Denis Vlasenko
aa7a888e42 kbd_mode: new applet by Loïc Grenié <loic.grenie@gmail.com>
kbd_mode_main                                          -     189    +189
packed_usage                                       22745   22833     +88
applets                                             3132    3144     +12
static.opts                                            7      12      +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 294/0)             Total: 294 bytes
   text    data     bss     dec     hex filename
 777210    1000    9532  787742   c051e busybox_old
 777575    1000    9532  788107   c068b busybox_unstripped
2007-10-20 00:17:34 +00:00
Denis Vlasenko
f74194e942 xatonum.h: add comment
lineedit: fix typo in comment
httpd: support for proxying connection to other http server
(by Alex Landau <landau_alex@yahoo.com>)
2007-10-18 12:54:39 +00:00
Denis Vlasenko
16e74b7464 another fix for build failure found by randomconfig 2007-10-17 09:59:01 +00:00
Denis Vlasenko
aff3a306b8 even more fixes from randomconfig runs 2007-10-16 23:00:50 +00:00
Denis Vlasenko
3f5fdc7572 remove trailing whitespace 2007-10-14 04:55:59 +00:00
Denis Vlasenko
15cb4a4272 fix a problem with two different applet_name's 2007-10-11 10:06:26 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
724d196c75 Move applets/applet.c into libbb, allows to get rid of --whole-archive
(smaller code). Tested in static and shared mode.
2007-10-10 14:41:07 +00:00
Denis Vlasenko
82d38dab91 get rid of global "struct bb_applet *current_applet" 2007-10-10 14:38:47 +00:00
Denis Vlasenko
d419a9f830 whitespace fix 2007-10-08 20:45:42 +00:00
Denis Vlasenko
ac7d0e375e add libbb/appletlib.c 2007-10-08 19:32:12 +00:00
Denis Vlasenko
d62fd84d4b libbusybox: move (possibly compressed) help stuff into libbusybox.
Makes individual binaries much smaller.
2007-10-07 20:46:34 +00:00
Denis Vlasenko
feb7ae7f01 printf("%s\n") -> puts() 2007-10-01 12:05:12 +00:00
Denis Vlasenko
0c97c9d437 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.
2007-10-01 11:58:38 +00:00
Denis Vlasenko
96e1b38586 introduce and use close_on_exec_on(fd). -50 bytes. 2007-09-30 23:50:48 +00:00
Denis Vlasenko
a4f4de9b7e print_signames_and_exit -> print_signames (because of "ash calls kill_main") 2007-09-30 16:32:01 +00:00
Denis Vlasenko
304a97a1ec trivial typo fix 2007-09-29 22:49:26 +00:00
Denis Vlasenko
72e1c89d97 pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com> 2007-09-29 22:26:01 +00:00
Denis Vlasenko
2450e4ba44 xrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time 2007-09-29 19:19:55 +00:00
Denis Vlasenko
1ebd0a6d91 remove if() which is always true 2007-09-29 18:27:14 +00:00
Denis Vlasenko
ab8c9378c9 more "if (p) free(p)" fixes; fix a typo in comment 2007-09-28 22:13:55 +00:00
Denis Vlasenko
e918e155ed remove stray semicolon 2007-09-28 21:56:36 +00:00
Denis Vlasenko
8607677529 libbb: make const_int_0 reside in rodata 2007-09-27 20:49:57 +00:00
Denis Vlasenko
1d31f0f380 libbb: align bb_common_bufsiz1 to "long long" 2007-09-27 20:46:08 +00:00
Denis Vlasenko
4daad9004d introduce bb_putchar(). saves ~1800 on uclibc (less on glibc). 2007-09-27 10:20:47 +00:00
Denis Vlasenko
86b29ea9e8 lineedit: plug memory leak 2007-09-27 10:17:16 +00:00
Denis Vlasenko
5d61e71c3a introduce safe_poll (fixes a problem in top)
function                                             old     new   delta
safe_poll                                              -      77     +77
svlogd_main                                         1470    1466      -4
zcip_main                                           1530    1524      -6
forkexec                                            1345    1338      -7
decode_format_string                                 795     788      -7
collect_blk                                          474     467      -7
buffer_pread                                         540     532      -8
tftp                                                1182    1172     -10
microcom_main                                        763     749     -14
arpping                                              441     424     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80)             Total: -3 bytes
   text    data     bss     dec     hex filename
 770162    1034   10404  781600   bed20 busybox_old
 770158    1034   10404  781596   bed1c busybox_unstripped
2007-09-27 10:09:59 +00:00
Denis Vlasenko
6a5377ac14 documentation bits in comments, no code changes 2007-09-25 18:35:28 +00:00
Denis Vlasenko
818322b9b1 *: kill bb_get_last_path_component, replace with two functions
(one which strips trailing slash and one which does not)
wget: straighten out as a result of above change
   text    data     bss     dec     hex filename
   5056       1       0    5057    13c1 busybox.t4/networking/wget.o
   5022       0       0    5022    139e busybox.t5/networking/wget.o
2007-09-24 18:27:04 +00:00
Denis Vlasenko
a9335eafcf cp: make it a bit closer to POSIX, but still refuse to open and
write to dest which is a symlink.
2007-09-11 16:28:14 +00:00
Denis Vlasenko
fa05074eee cp: make "cp file /dev/node" special case; explained in comments
function                                             old     new   delta
copy_file                                           1487    1538     +51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 51/0)               Total: 51 bytes
   text    data     bss     dec     hex filename
 772502    1051   10724  784277   bf795 busybox_old
 772554    1051   10724  784329   bf7c9 busybox_unstripped
2007-09-11 10:39:13 +00:00
Denis Vlasenko
976690afe0 run_shell: code shrink for selinux 2007-09-10 17:17:01 +00:00
Denis Vlasenko
a2f61012b6 setup_environment: code shrink
run_shell: mark as NORETURN
setup_environment, run_shell: add usage comments
login: add FIXME :(

function                                             old     new   delta
UNSPEC_print                                          64      66      +2
sulogin_main                                         509     506      -3
mkfs_minix_main                                     3070    3067      -3
login_main                                          1615    1612      -3
su_main                                              461     448     -13
setup_environment                                    261     206     -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-77)             Total: -75 bytes
   text    data     bss     dec     hex filename
 772578    1051   10724  784353   bf7e1 busybox_old
 772502    1051   10724  784277   bf795 busybox_unstripped
2007-09-10 13:15:28 +00:00
Denis Vlasenko
ff6e8e2974 top: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,
+80 bytes when disabled (mainly because of text wrapping fixes
in display_process_list).
2007-09-08 16:51:19 +00:00
Denis Vlasenko
c8d4d2f11d messages: by popular request allow PATH to be customized at build time
mount: smallish code shrink
2007-09-07 19:33:56 +00:00
Denis Vlasenko
beffd43d8e busybox --install -s: prevent puzzling "/bin/busybox: Invalid argument" message
libbb: comment out realpath, add readlink which doesn't warn
2007-09-05 11:30:34 +00:00
Denis Vlasenko
76c476f817 smart_ulltoa5: emit small letters k,m,g... - makes top
more readable
2007-08-28 20:04:15 +00:00
Denis Vlasenko
b308d81e92 top: use poll instead of select for waiting on one descriptor
smart_ulltoa5: make it more cryptic. -50 bytes.

function                                             old     new   delta
passwd_main                                         1095    1103      +8
getNum                                               557     565      +8
buffer_fill_and_print                                 73      76      +3
udhcpc_main                                         2393    2395      +2
mkfs_minix_main                                     3071    3070      -1
dname_enc                                            377     373      -4
expmeta                                              480     472      -8
smart_ulltoa5                                        334     283     -51
top_main                                             911     815     -96
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/5 up/down: 21/-160)          Total: -139 bytes
   text    data     bss     dec     hex filename
 770872    1063   10788  782723   bf183 busybox_old
 770732    1063   10788  782583   bf0f7 busybox_unstripped
2007-08-28 19:35:34 +00:00
Denis Vlasenko
0f214ecef0 cp: fix recursion check to not waste bytes remembering names of dirs 2007-08-27 17:02:19 +00:00
Denis Vlasenko
8a5fab6333 cp: detect and prevent infinite recursion 2007-08-27 16:51:30 +00:00
Denis Vlasenko
512499c8ca ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes) 2007-08-26 18:23:13 +00:00
Denis Vlasenko
30bab71f7b make copy_file() a bit easier to understand, and smaller
function                                             old     new   delta
copy_file                                           1565    1447    -118
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-118)           Total: -118 bytes
   text    data     bss     dec     hex filename
 770938    1063   10788  782789   bf1c5 busybox_old
 770814    1063   10788  782665   bf149 busybox_unstripped
2007-08-25 21:14:55 +00:00
Denis Vlasenko
737d131e5e support "#!/bin/busybox"-style wrappers. Needed for SELinux.
Patch by Yuichi Nakamura <ynakam@hitachisoft.jp>
2007-08-25 18:25:24 +00:00
Denis Vlasenko
6666ac42a5 cp,mv: simpler arg[cv] handling -> smallish code savings 2007-08-24 21:46:24 +00:00
Denis Vlasenko
3d829627fb cp: make POSIX-me-harder mode complain with a bit less insane message 2007-08-24 14:23:57 +00:00
Denis Vlasenko
d37f22225b libbb,crond,lash: fix getopt32 (don't know how it managed to slip through)
*: fcntl(fd, F_GETFL) doesn't require third parameter at all.
2007-08-19 13:42:08 +00:00
Denis Vlasenko
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(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
2007-08-18 15:32:12 +00:00
Denis Vlasenko
367960ba9a make standalone httpd work on NOMMU machines 2007-08-18 14:20:21 +00:00
Denis Vlasenko
a27a11bb2c introduce and use xdup2(int, int)
stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is)
remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions

sockaddr2str                                         142     156     +14
collect_blk                                          467     474      +7
xdup2                                                 28      33      +5
singlemount                                         4456    4454      -2
print_host                                           214     212      -2
nslookup_main                                        139     137      -2
ftpgetput_main                                       414     412      -2
udhcpd_main                                         1258    1255      -3
udhcpc_main                                         2405    2402      -3
traceroute_main                                     4125    4122      -3
nc_main                                             1072    1069      -3
buffer_fill_and_print                                 76      73      -3
xmalloc_sockaddr2hostonly_noport                      18      14      -4
xmalloc_sockaddr2host_noport                          18      14      -4
xmalloc_sockaddr2host                                 15      11      -4
xmalloc_sockaddr2dotted_noport                        18      14      -4
xmalloc_sockaddr2dotted                               18      14      -4
wget_main                                           2618    2614      -4
ping_main                                            393     389      -4
ip_port_str                                          120     115      -5
dhcprelay_main                                      1146    1141      -5
dnsd_main                                           1531    1525      -6
passwd_main                                         1110    1102      -8
udhcp_kernel_packet                                  206     197      -9
udhcp_listen_socket                                  154     144     -10
getty_main                                          2576    2566     -10
setup                                                655     640     -15
xmove_fd                                              51      34     -17
dolisten                                             759     742     -17
tcpudpsvd_main                                      1866    1836     -30
startservice                                         339     299     -40
2007-08-18 14:16:39 +00:00
Denis Vlasenko
1b97efd66a httpd shring and logging update, part 1 or 7
text    data     bss     dec     hex filename
   9836       0       0    9836    266c busybox.t1/networking/httpd.o.orig
   9724       0       0    9724    25fc busybox.t2/networking/httpd.o
   9657       0       0    9657    25b9 busybox.t3/networking/httpd.o
   9342       0       0    9342    247e busybox.t4/networking/httpd.o
   9342       0       0    9342    247e busybox.t5/networking/httpd.o
   9262       0       0    9262    242e busybox.t6/networking/httpd.o
   9283       0       0    9283    2443 busybox.t7/networking/httpd.o
   9334       0       0    9334    2476 busybox.t8/networking/httpd.o
2007-08-17 19:18:06 +00:00
Denis Vlasenko
a0319ba936 hdparm: shrink rodata by ~250 bytes 2007-08-16 10:37:49 +00:00
Denis Vlasenko
6a2f7f41cf whitespace fixes, no code changes 2007-08-16 10:35:17 +00:00
Denis Vlasenko
ab9c44b1a4 v[hp]error_msg have 2-3 callsites only -> incorporate there. 2007-08-15 20:07:53 +00:00
Denis Vlasenko
bb23c06919 if pidfile turned out to be !regular file, do not unlink it.
It's most probably the /dev/null.
2007-08-15 20:05:37 +00:00
Denis Vlasenko
384b1d12f9 httpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]
get_line                                               -      70     +70
packed_usage                                       22811   22863     +52
handle_incoming_and_exit                            2246    2277     +31
httpd_main                                          1141    1155     +14
sendHeaders                                          489     482      -7
getLine                                               77       -     -77
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 167/-84)            Total: 83 bytes
   text    data     bss     dec     hex filename
 774335    1058   11092  786485   c0035 busybox_old
 774447    1058   11092  786597   c00a5 busybox_unstripped
2007-08-14 16:55:01 +00:00
Denis Vlasenko
dbe6e66d6a trylink: automatically use custom link script if user provides one
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
2007-08-14 16:43:01 +00:00
Denis Vlasenko
3952f20c24 expand, unexpand: new applets from Tito <farmatito@tiscali.it> 2007-08-13 14:10:24 +00:00
Denis Vlasenko
e324184c05 s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
e5d37ccb6e httpd: fix CGI handling bug (we were closing wrong fd). 2007-08-11 20:20:02 +00:00
Denis Vlasenko
f893da875a ls,ps,watch: measure terminal width on fd 0, not 1 2007-08-09 08:27:24 +00:00
Denis Vlasenko
501bfe2630 stat: fix option -Z segv (bug 1454) 2007-08-09 08:10:13 +00:00