people/mcb30/busybox.git
13 years agofix infinite retry bug. also, reduce per-packet receive timeout
pgf [Thu, 6 Sep 2007 17:52:22 +0000 (17:52 +0000)]
fix infinite retry bug.  also, reduce per-packet receive timeout
to something more reasonable than 5 seconds, and add simple
exponential backoff to compensate.  improves performance on
marginal networks.

git-svn-id: svn://busybox.net/trunk/busybox@19797 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofix -xdev behavior in the presence of two or more nested mount points
pgf [Thu, 6 Sep 2007 17:45:16 +0000 (17:45 +0000)]
fix -xdev behavior in the presence of two or more nested mount points
on the command line, e.g. "find / /boot -xdev".

git-svn-id: svn://busybox.net/trunk/busybox@19796 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoumount: support (by ignoring) -i; style fixes
vda [Thu, 6 Sep 2007 16:57:05 +0000 (16:57 +0000)]
umount: support (by ignoring) -i; style fixes

git-svn-id: svn://busybox.net/trunk/busybox@19795 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agousage: trim a bit
vda [Wed, 5 Sep 2007 15:45:51 +0000 (15:45 +0000)]
usage: trim a bit

function                                             old     new   delta
packed_usage                                       23113   23011    -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-102)           Total: -102 bytes
   text    data     bss     dec     hex filename
 770610    1051   10764  782425   bf059 busybox_old
 770508    1051   10764  782323   beff3 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19794 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowatchdog: allow millisecond spec (-t 250ms)
vda [Wed, 5 Sep 2007 12:13:51 +0000 (12:13 +0000)]
watchdog: allow millisecond spec (-t 250ms)

function                                             old     new   delta
packed_usage                                       23069   23113     +44
static.suffixes                                        -      24     +24
watchdog_main                                        147     160     +13
static.V                                               -       1      +1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 82/0)               Total: 82 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19793 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotar + gzip/bzip2/etc: support NOMMU machines (by Alex Landau <landau_alex@yahoo.com>)
vda [Wed, 5 Sep 2007 11:48:32 +0000 (11:48 +0000)]
tar + gzip/bzip2/etc: support NOMMU machines (by Alex Landau <landau_alex@yahoo.com>)

git-svn-id: svn://busybox.net/trunk/busybox@19792 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobusybox --install -s: prevent puzzling "/bin/busybox: Invalid argument" message
vda [Wed, 5 Sep 2007 11:30:34 +0000 (11:30 +0000)]
busybox --install -s: prevent puzzling "/bin/busybox: Invalid argument" message
libbb: comment out realpath, add readlink which doesn't warn

git-svn-id: svn://busybox.net/trunk/busybox@19791 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotar: conditionally don't wait for vforked child to exec, as it always
vda [Tue, 4 Sep 2007 19:33:22 +0000 (19:33 +0000)]
tar: conditionally don't wait for vforked child to exec, as it always
works right on Linux, and anyway mayresult only on less-than-clear error
message only, it will not cause tar to misbehave.

function                                             old     new   delta
open_transformer                                      98      80     -18
writeTarFile                                         714     547    -167
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-185)           Total: -185 bytes
   text    data     bss     dec     hex filename
 770651    1051   10764  782466   bf082 busybox_old
 770463    1051   10764  782278   befc6 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19783 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomount: ignore NFS bg option on NOMMU machines
vda [Tue, 4 Sep 2007 18:30:26 +0000 (18:30 +0000)]
mount: ignore NFS bg option on NOMMU machines

git-svn-id: svn://busybox.net/trunk/busybox@19782 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodu: remove statics (by Bernhard Fischer <rep.dot.nop@gmail.com>)
vda [Mon, 3 Sep 2007 20:05:58 +0000 (20:05 +0000)]
du: remove statics (by Bernhard Fischer <rep.dot.nop@gmail.com>)

$ ./.cmk bloatcheck
function                                             old     new   delta
du_main                                              340     348      +8
print                                                 39      40      +1
status                                               129     125      -4
slink_depth                                            4       -      -4
print_files                                            4       -      -4
one_file_system                                        4       -      -4
max_print_depth                                        4       -      -4
du_depth                                               4       -      -4
disp_hr                                                4       -      -4
count_hardlinks                                        4       -      -4
du                                                   407     401      -6
dir_dev                                                8       -      -8
------------------------------------------------------------------------------
(add/remove: 0/8 grow/shrink: 2/2 up/down: 9/-46)             Total: -37 bytes
   text    data     bss     dec     hex filename
    864      12      28     904     388 busybox.t3/coreutils/du.o
    867       0       0     867     363 busybox.t4/coreutils/du.o
 770647    1063   10788  782498   bf0a2 busybox.t3/busybox_unstripped
 770651    1051   10764  782466   bf082 busybox.t4/busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19776 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agologin: do reject wrong passwords with PAM auth
vda [Mon, 3 Sep 2007 11:56:27 +0000 (11:56 +0000)]
login: do reject wrong passwords with PAM auth

git-svn-id: svn://busybox.net/trunk/busybox@19775 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: reinstate accidentally deleted --verbose
vda [Mon, 3 Sep 2007 11:28:14 +0000 (11:28 +0000)]
trylink: reinstate accidentally deleted --verbose
trylink: remove commented-out parts

git-svn-id: svn://busybox.net/trunk/busybox@19774 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- IFUPDOWN_IFSTATE_PATH depends on IFUPDOWN
aldot [Sun, 2 Sep 2007 22:12:07 +0000 (22:12 +0000)]
- IFUPDOWN_IFSTATE_PATH depends on IFUPDOWN

git-svn-id: svn://busybox.net/trunk/busybox@19768 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- Generally strip off -l that does not pull in a lib.
aldot [Sun, 2 Sep 2007 15:28:30 +0000 (15:28 +0000)]
- Generally strip off -l that does not pull in a lib.
  If l_list is non-empty then add the group flags.

git-svn-id: svn://busybox.net/trunk/busybox@19762 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- fix bug where we linked again -lm even though it is not needed.
aldot [Sun, 2 Sep 2007 14:51:54 +0000 (14:51 +0000)]
- fix bug where we linked again -lm even though it is not needed.
  For BBOX_LIB_LIST="crypt m" trylink ... with just applet true, we pulled in
  libm because in this case we tried to use invalid flags (plain "-l" without
  a lib) which of course failed, thus the script thought that -lm was needed.

  The fix is not to pass "-l" without a lib if we are about to check if any
  or the last remaining lib is really needed.

git-svn-id: svn://busybox.net/trunk/busybox@19760 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoisrv: use monotonic_sec
vda [Fri, 31 Aug 2007 21:45:52 +0000 (21:45 +0000)]
isrv: use monotonic_sec
runsv: do not use clock_gettime if !MONOTONIC_CLOCK

git-svn-id: svn://busybox.net/trunk/busybox@19742 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotop: another readability fix
vda [Wed, 29 Aug 2007 18:34:26 +0000 (18:34 +0000)]
top: another readability fix

git-svn-id: svn://busybox.net/trunk/busybox@19736 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agovsz and rss are unsigned longs (ulong ~= width of void* =>
vda [Wed, 29 Aug 2007 18:23:36 +0000 (18:23 +0000)]
vsz and rss are unsigned longs (ulong ~= width of void* =>
suitable for expressing total RAM in system). We account
for "32 bit in 64 bit" systems by storing kbytes, not bytes
there. Should allow for up to ~2000 Gb RAM on 32 bits.

git-svn-id: svn://busybox.net/trunk/busybox@19735 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotop: don't wait before final bailout (try top -b -n1).
vda [Wed, 29 Aug 2007 18:18:08 +0000 (18:18 +0000)]
top: don't wait before final bailout (try top -b -n1).
top: make code a bit more readable.

git-svn-id: svn://busybox.net/trunk/busybox@19734 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomount: allow (and ignore) -i
vda [Wed, 29 Aug 2007 11:49:41 +0000 (11:49 +0000)]
mount: allow (and ignore) -i

git-svn-id: svn://busybox.net/trunk/busybox@19730 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosmart_ulltoa5: emit small letters k,m,g... - makes top
vda [Tue, 28 Aug 2007 20:04:15 +0000 (20:04 +0000)]
smart_ulltoa5: emit small letters k,m,g... - makes top
more readable

git-svn-id: svn://busybox.net/trunk/busybox@19720 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotop: use poll instead of select for waiting on one descriptor
vda [Tue, 28 Aug 2007 19:35:34 +0000 (19:35 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19717 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomount: don't close fd twice in NFS code
vda [Tue, 28 Aug 2007 11:23:23 +0000 (11:23 +0000)]
mount: don't close fd twice in NFS code

git-svn-id: svn://busybox.net/trunk/busybox@19711 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocp: fix recursion check to not waste bytes remembering names of dirs
vda [Mon, 27 Aug 2007 17:02:19 +0000 (17:02 +0000)]
cp: fix recursion check to not waste bytes remembering names of dirs

git-svn-id: svn://busybox.net/trunk/busybox@19706 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocp: detect and prevent infinite recursion
vda [Mon, 27 Aug 2007 16:51:30 +0000 (16:51 +0000)]
cp: detect and prevent infinite recursion

git-svn-id: svn://busybox.net/trunk/busybox@19705 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agops: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)
vda [Sun, 26 Aug 2007 18:23:13 +0000 (18:23 +0000)]
ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)

git-svn-id: svn://busybox.net/trunk/busybox@19700 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoadd links to vda's pet projects
vda [Sun, 26 Aug 2007 16:39:47 +0000 (16:39 +0000)]
add links to vda's pet projects

git-svn-id: svn://busybox.net/trunk/busybox@19699 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinstall: shrink a bit, fix two buglets
vda [Sun, 26 Aug 2007 14:21:55 +0000 (14:21 +0000)]
install: shrink a bit, fix two buglets

git-svn-id: svn://busybox.net/trunk/busybox@19698 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoStart a small document "why ifupdown is bad"
vda [Sat, 25 Aug 2007 22:16:04 +0000 (22:16 +0000)]
Start a small document "why ifupdown is bad"

git-svn-id: svn://busybox.net/trunk/busybox@19697 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake copy_file() a bit easier to understand, and smaller
vda [Sat, 25 Aug 2007 21:14:55 +0000 (21:14 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19696 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosupport "#!/bin/busybox"-style wrappers. Needed for SELinux.
vda [Sat, 25 Aug 2007 18:25:24 +0000 (18:25 +0000)]
support "#!/bin/busybox"-style wrappers. Needed for SELinux.
Patch by Yuichi Nakamura <ynakam@hitachisoft.jp>

git-svn-id: svn://busybox.net/trunk/busybox@19695 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- add Yann's email-addr
aldot [Sat, 25 Aug 2007 11:16:18 +0000 (11:16 +0000)]
- add Yann's email-addr

git-svn-id: svn://busybox.net/trunk/busybox@19692 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocp,mv: simpler arg[cv] handling -> smallish code savings
vda [Fri, 24 Aug 2007 21:46:24 +0000 (21:46 +0000)]
cp,mv: simpler arg[cv] handling -> smallish code savings

git-svn-id: svn://busybox.net/trunk/busybox@19690 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- cosmetic html cleanup
aldot [Fri, 24 Aug 2007 14:32:23 +0000 (14:32 +0000)]
- cosmetic html cleanup

git-svn-id: svn://busybox.net/trunk/busybox@19689 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- obfuscate addrs a little bit
aldot [Fri, 24 Aug 2007 14:30:59 +0000 (14:30 +0000)]
- obfuscate addrs a little bit

git-svn-id: svn://busybox.net/trunk/busybox@19688 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocp: make POSIX-me-harder mode complain with a bit less insane message
vda [Fri, 24 Aug 2007 14:23:57 +0000 (14:23 +0000)]
cp: make POSIX-me-harder mode complain with a bit less insane message

git-svn-id: svn://busybox.net/trunk/busybox@19687 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agospelling fixes to website
vda [Fri, 24 Aug 2007 12:52:04 +0000 (12:52 +0000)]
spelling fixes to website

git-svn-id: svn://busybox.net/trunk/busybox@19684 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoCosmetic fixes to webpage
vda [Fri, 24 Aug 2007 11:49:55 +0000 (11:49 +0000)]
Cosmetic fixes to webpage

git-svn-id: svn://busybox.net/trunk/busybox@19683 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoadd missed attribution to httpd sendfile support
vda [Fri, 24 Aug 2007 11:18:21 +0000 (11:18 +0000)]
add missed attribution to httpd sendfile support

git-svn-id: svn://busybox.net/trunk/busybox@19682 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoStart 1.8.x cycle
vda [Fri, 24 Aug 2007 11:05:49 +0000 (11:05 +0000)]
Start 1.8.x cycle

git-svn-id: svn://busybox.net/trunk/busybox@19679 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agonews.html: add 1.7.0 announcement
vda [Fri, 24 Aug 2007 10:28:55 +0000 (10:28 +0000)]
news.html: add 1.7.0 announcement

git-svn-id: svn://busybox.net/trunk/busybox@19675 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoUpdate defconfig; fix comments
vda [Fri, 24 Aug 2007 10:27:41 +0000 (10:27 +0000)]
Update defconfig; fix comments

git-svn-id: svn://busybox.net/trunk/busybox@19674 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobuild system: stop moaning about unset integer CONFIGs.
vda [Thu, 23 Aug 2007 14:11:30 +0000 (14:11 +0000)]
build system: stop moaning about unset integer CONFIGs.

git-svn-id: svn://busybox.net/trunk/busybox@19667 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago*: compile fixes for 64-bit build
vda [Thu, 23 Aug 2007 10:52:52 +0000 (10:52 +0000)]
*: compile fixes for 64-bit build

git-svn-id: svn://busybox.net/trunk/busybox@19665 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: code shrink of dir indexer example
vda [Thu, 23 Aug 2007 10:43:18 +0000 (10:43 +0000)]
httpd: code shrink of dir indexer example

git-svn-id: svn://busybox.net/trunk/busybox@19664 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agologin: fixes for PAM build
vda [Wed, 22 Aug 2007 18:14:44 +0000 (18:14 +0000)]
login: fixes for PAM build

git-svn-id: svn://busybox.net/trunk/busybox@19659 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: style fix in indexer example
vda [Wed, 22 Aug 2007 10:46:44 +0000 (10:46 +0000)]
httpd: style fix in indexer example

git-svn-id: svn://busybox.net/trunk/busybox@19643 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: replace shell-based dir indexer cgi example with C-based one.
vda [Wed, 22 Aug 2007 10:38:44 +0000 (10:38 +0000)]
httpd: replace shell-based dir indexer cgi example with C-based one.

git-svn-id: svn://busybox.net/trunk/busybox@19642 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: fix buglet in hex conversion. Remove alloca NULL checks
vda [Tue, 21 Aug 2007 11:18:25 +0000 (11:18 +0000)]
httpd: fix buglet in hex conversion. Remove alloca NULL checks
(never happens, app just crashes if stack overflows)
svlogd: cosmetic messages and style fixes

git-svn-id: svn://busybox.net/trunk/busybox@19611 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agologin: optional support for PAM
vda [Tue, 21 Aug 2007 10:58:18 +0000 (10:58 +0000)]
login: optional support for PAM

git-svn-id: svn://busybox.net/trunk/busybox@19610 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agos/communal/common/ part 2
vda [Tue, 21 Aug 2007 10:54:59 +0000 (10:54 +0000)]
s/communal/common/ part 2

git-svn-id: svn://busybox.net/trunk/busybox@19608 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agos/communal/common/
vda [Tue, 21 Aug 2007 10:54:34 +0000 (10:54 +0000)]
s/communal/common/

git-svn-id: svn://busybox.net/trunk/busybox@19607 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: add optional support for error pages
vda [Tue, 21 Aug 2007 10:26:55 +0000 (10:26 +0000)]
httpd: add optional support for error pages
(by Pierre Metras <genepi@sympatico.ca>)

git-svn-id: svn://busybox.net/trunk/busybox@19601 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agorunit/*: get rid of tai[a] time abstraction, it's too bloaty.
vda [Mon, 20 Aug 2007 17:27:40 +0000 (17:27 +0000)]
runit/*: get rid of tai[a] time abstraction, it's too bloaty.

   text    data     bss     dec     hex filename
 772537    1058   11092  784687   bf92f busybox.t0/busybox
 772459    1058   11060  784577   bf8c1 busybox.t1/busybox
 772326    1058   11028  784412   bf81c busybox.t2/busybox
 772158    1058   10980  784196   bf744 busybox.t3/busybox
 771490    1055   10988  783533   bf4ad busybox.t4/busybox

git-svn-id: svn://busybox.net/trunk/busybox@19593 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremoved stray debugging comments
vda [Sun, 19 Aug 2007 21:24:37 +0000 (21:24 +0000)]
removed stray debugging comments

git-svn-id: svn://busybox.net/trunk/busybox@19574 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomax_option_length[] holds small ints, uint8_t is enough
vda [Sun, 19 Aug 2007 21:21:16 +0000 (21:21 +0000)]
max_option_length[] holds small ints, uint8_t is enough

function                                             old     new   delta
max_option_length                                     44      11     -33

git-svn-id: svn://busybox.net/trunk/busybox@19573 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: explain IP/mask parsing, and simplify it a bit.
vda [Sun, 19 Aug 2007 21:15:42 +0000 (21:15 +0000)]
httpd: explain IP/mask parsing, and simplify it a bit.

parse_conf                                          1258    1247     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11)             Total: -11 bytes
   text    data     bss     dec     hex filename
 772602    1058   11092  784752   bf970 busybox_old
 772594    1058   11092  784744   bf968 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19571 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: reinstate (much lighter) paranoid connection close code
vda [Sun, 19 Aug 2007 19:28:09 +0000 (19:28 +0000)]
httpd: reinstate (much lighter) paranoid connection close code
allegedly needed for some versions of IE. +45 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@19564 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: get rid of rmt_port and setenv_log
vda [Sun, 19 Aug 2007 18:54:22 +0000 (18:54 +0000)]
httpd: get rid of rmt_port and setenv_log

git-svn-id: svn://busybox.net/trunk/busybox@19563 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: get rid of sscanf usage. Rename some variables.
vda [Sun, 19 Aug 2007 18:53:43 +0000 (18:53 +0000)]
httpd: get rid of sscanf usage. Rename some variables.

git-svn-id: svn://busybox.net/trunk/busybox@19562 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocrond: code shrink
vda [Sun, 19 Aug 2007 18:49:21 +0000 (18:49 +0000)]
crond: code shrink

git-svn-id: svn://busybox.net/trunk/busybox@19561 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibbb,crond,lash: fix getopt32 (don't know how it managed to slip through)
vda [Sun, 19 Aug 2007 13:42:08 +0000 (13:42 +0000)]
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.

git-svn-id: svn://busybox.net/trunk/busybox@19559 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocrond: don't start sendmail with absolute path
vda [Sat, 18 Aug 2007 15:48:00 +0000 (15:48 +0000)]
crond: don't start sendmail with absolute path
crond: don't report obsolete version, report true bbox version

git-svn-id: svn://busybox.net/trunk/busybox@19558 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodon't pass argc in getopt32, it's superfluous
vda [Sat, 18 Aug 2007 15:32:12 +0000 (15:32 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19557 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: stop reading headers using 1-byte read()
vda [Sat, 18 Aug 2007 14:22:09 +0000 (14:22 +0000)]
httpd: stop reading headers using 1-byte read()

get_line                                              73     105     +32
httpd_main                                           769     766      -3
send_cgi_and_exit                                   1583    1577      -6
send_headers                                         449     432     -17
handle_incoming_and_exit                            2217    2172     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 32/-71)            Total: -39 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19556 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake standalone httpd work on NOMMU machines
vda [Sat, 18 Aug 2007 14:20:21 +0000 (14:20 +0000)]
make standalone httpd work on NOMMU machines

git-svn-id: svn://busybox.net/trunk/busybox@19555 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoget rid of server_ and accepted_socket globals.
vda [Sat, 18 Aug 2007 14:18:43 +0000 (14:18 +0000)]
get rid of server_ and accepted_socket globals.

get_line                                              74      73      -1
log_and_exit                                          33      32      -1
send_headers                                         457     449      -8
httpd_main                                           906     892     -14
handle_incoming_and_exit                            2136    2113     -23
send_cgi_and_exit                                   1743    1583    -160

git-svn-id: svn://busybox.net/trunk/busybox@19554 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agointroduce and use xdup2(int, int)
vda [Sat, 18 Aug 2007 14:16:39 +0000 (14:16 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19553 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 7 of 7
vda [Fri, 17 Aug 2007 19:21:12 +0000 (19:21 +0000)]
httpd shrink and logging update, part 7 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19550 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 6 of 7
vda [Fri, 17 Aug 2007 19:20:39 +0000 (19:20 +0000)]
httpd shrink and logging update, part 6 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19549 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 5 of 7
vda [Fri, 17 Aug 2007 19:20:07 +0000 (19:20 +0000)]
httpd shrink and logging update, part 5 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19548 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 4 of 7
vda [Fri, 17 Aug 2007 19:19:42 +0000 (19:19 +0000)]
httpd shrink and logging update, part 4 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19547 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 3 of 7
vda [Fri, 17 Aug 2007 19:19:15 +0000 (19:19 +0000)]
httpd shrink and logging update, part 3 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19546 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shrink and logging update, part 2 of 7
vda [Fri, 17 Aug 2007 19:18:47 +0000 (19:18 +0000)]
httpd shrink and logging update, part 2 of 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

git-svn-id: svn://busybox.net/trunk/busybox@19545 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd shring and logging update, part 1 or 7
vda [Fri, 17 Aug 2007 19:18:06 +0000 (19:18 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19544 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove stray newline from help text
vda [Fri, 17 Aug 2007 08:45:58 +0000 (08:45 +0000)]
remove stray newline from help text

git-svn-id: svn://busybox.net/trunk/busybox@19538 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoassorted fixes for breakage found by randomconfig
vda [Fri, 17 Aug 2007 08:29:48 +0000 (08:29 +0000)]
assorted fixes for breakage found by randomconfig

git-svn-id: svn://busybox.net/trunk/busybox@19537 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoadd comments regarding SO_REUSEADDR
vda [Thu, 16 Aug 2007 18:27:47 +0000 (18:27 +0000)]
add comments regarding SO_REUSEADDR

git-svn-id: svn://busybox.net/trunk/busybox@19533 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoComment out "#include <strings.h>" everywhere
vda [Thu, 16 Aug 2007 11:29:08 +0000 (11:29 +0000)]
Comment out "#include <strings.h>" everywhere

git-svn-id: svn://busybox.net/trunk/busybox@19530 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofind: fix SELinux-related warning
vda [Thu, 16 Aug 2007 10:41:24 +0000 (10:41 +0000)]
find: fix SELinux-related warning

git-svn-id: svn://busybox.net/trunk/busybox@19528 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomodprobe: add scanning of /lib/modules/`uname -r`/modules.symbols
vda [Thu, 16 Aug 2007 10:40:06 +0000 (10:40 +0000)]
modprobe: add scanning of /lib/modules/`uname -r`/modules.symbols
  (by Yann E. MORIN)

git-svn-id: svn://busybox.net/trunk/busybox@19527 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: shrink rodata by ~250 bytes
vda [Thu, 16 Aug 2007 10:37:49 +0000 (10:37 +0000)]
hdparm: shrink rodata by ~250 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19526 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowhitespace fixes, no code changes
vda [Thu, 16 Aug 2007 10:35:17 +0000 (10:35 +0000)]
whitespace fixes, no code changes

git-svn-id: svn://busybox.net/trunk/busybox@19525 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomore: by Tristan Schmelcher <tpkschme@engmail.uwaterloo.ca>:
vda [Wed, 15 Aug 2007 20:42:52 +0000 (20:42 +0000)]
more: by Tristan Schmelcher <tpkschme@engmail.uwaterloo.ca>:
- Fixed a number of deficiencies in the line wrapping.
- Fixed a bug where the page could scroll multiple times per keypress.
- Re-read terminal dimensions after user input, in case they
  resized the terminal while we were waiting.
- Added an 'R' key to print the rest of the file without prompting.
- Crudely support tabs in the line-wrapping code by converting
  them to 8 spaces.

git-svn-id: svn://busybox.net/trunk/busybox@19519 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agov[hp]error_msg have 2-3 callsites only -> incorporate there.
vda [Wed, 15 Aug 2007 20:07:53 +0000 (20:07 +0000)]
v[hp]error_msg have 2-3 callsites only -> incorporate there.

git-svn-id: svn://busybox.net/trunk/busybox@19518 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoif pidfile turned out to be !regular file, do not unlink it.
vda [Wed, 15 Aug 2007 20:05:37 +0000 (20:05 +0000)]
if pidfile turned out to be !regular file, do not unlink it.
It's most probably the /dev/null.

git-svn-id: svn://busybox.net/trunk/busybox@19517 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodhcpd: make -S and -f actually work
vda [Wed, 15 Aug 2007 20:03:36 +0000 (20:03 +0000)]
dhcpd: make -S and -f actually work

git-svn-id: svn://busybox.net/trunk/busybox@19516 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]
vda [Tue, 14 Aug 2007 16:55:01 +0000 (16:55 +0000)]
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

git-svn-id: svn://busybox.net/trunk/busybox@19509 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: extend -p PORT to -p [IP[v6]:]PORT
vda [Tue, 14 Aug 2007 16:50:01 +0000 (16:50 +0000)]
httpd: extend -p PORT to -p [IP[v6]:]PORT
httpd: comment out strange code which "closes connection properly"
(isnt exit(0) good enough?)

handle_incoming_and_exit                               -    2246   +2246
httpd_main                                          1116    1141     +25
getLine                                               75      77      +2
packed_usage                                       22827   22811     -16
parse_conf                                          1303    1284     -19
shutdown                                              32       -     -32
handleIncoming                                      2578       -   -2578
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/2 up/down: 2273/-2645)       Total: -372 bytes
   text    data     bss     dec     hex filename
 774704    1058   11092  786854   c01a6 busybox_old
 774335    1058   11092  786485   c0035 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19508 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoudhcpd: add -f "foreground" and -S "syslog" options
vda [Tue, 14 Aug 2007 16:45:29 +0000 (16:45 +0000)]
udhcpd: add -f "foreground" and -S "syslog" options
udhcpc: add -S "syslog" options
remove CONFIG_FEATURE_UDHCP_SYSLOG

function                                             old     new   delta
udhcpd_main                                         1168    1201     +33
udhcpc_main                                         2414    2425     +11
static.udhcpc_longopts                               191     200      +9
qgravechar                                           112     108      -4
packed_usage                                       22843   22827     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 53/-20)             Total: 33 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19507 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: automatically use custom link script if user provides one
vda [Tue, 14 Aug 2007 16:43:01 +0000 (16:43 +0000)]
trylink: automatically use custom link script if user provides one
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes

git-svn-id: svn://busybox.net/trunk/busybox@19506 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosyslogd: set syslog IPC buffer to mode 0644
vda [Tue, 14 Aug 2007 10:27:56 +0000 (10:27 +0000)]
syslogd: set syslog IPC buffer to mode 0644

git-svn-id: svn://busybox.net/trunk/busybox@19504 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoexpand, unexpand: new applets from Tito <farmatito@tiscali.it>
vda [Mon, 13 Aug 2007 14:10:24 +0000 (14:10 +0000)]
expand, unexpand: new applets from Tito <farmatito@tiscali.it>

git-svn-id: svn://busybox.net/trunk/busybox@19488 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodf: match coreutils behavior of wrapping lines if filesystem name is too long.
vda [Mon, 13 Aug 2007 12:27:49 +0000 (12:27 +0000)]
df: match coreutils behavior of wrapping lines if filesystem name is too long.
df: trim help text

git-svn-id: svn://busybox.net/trunk/busybox@19487 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: round down sendfile byte count to 64k
vda [Mon, 13 Aug 2007 11:09:30 +0000 (11:09 +0000)]
httpd: round down sendfile byte count to 64k
*: style fixes

git-svn-id: svn://busybox.net/trunk/busybox@19486 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agousage.h: style cleanup
vda [Mon, 13 Aug 2007 10:48:33 +0000 (10:48 +0000)]
usage.h: style cleanup

git-svn-id: svn://busybox.net/trunk/busybox@19485 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agos/#ifdef CONFIG_/#if ENABLE_/g
vda [Mon, 13 Aug 2007 10:36:25 +0000 (10:36 +0000)]
s/#ifdef CONFIG_/#if ENABLE_/g

git-svn-id: svn://busybox.net/trunk/busybox@19484 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosyslogd,logread: get rid of head pointer, fix logread bug in the process
vda [Sun, 12 Aug 2007 21:33:06 +0000 (21:33 +0000)]
syslogd,logread: get rid of head pointer, fix logread bug in the process

function                                             old     new   delta
logread_main                                         450     462     +12
syslogd_main                                        1246    1252      +6
shbuf                                                  -       4      +4
buf                                                   34      30      -4
packed_usage                                       22729   22724      -5
log_locally                                          957     767    -190
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/3 up/down: 22/-199)          Total: -177 bytes
   text    data     bss     dec     hex filename
 773886    1116   11316  786318   bff8e busybox_old
 773714    1116   11316  786146   bfee2 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@19470 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: sendfile support
vda [Sun, 12 Aug 2007 21:05:49 +0000 (21:05 +0000)]
httpd: sendfile support

git-svn-id: svn://busybox.net/trunk/busybox@19469 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofix out-of-source-tree build
vda [Sun, 12 Aug 2007 20:59:07 +0000 (20:59 +0000)]
fix out-of-source-tree build

git-svn-id: svn://busybox.net/trunk/busybox@19468 69ca8d6d-28ef-0310-b511-8ec308f3f277