people/mcb30/busybox.git
13 years agohdparm: paranoia-induced fix against theoretical div-by-0 case
vda [Fri, 28 Sep 2007 13:41:41 +0000 (13:41 +0000)]
hdparm: paranoia-induced fix against theoretical div-by-0 case

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

13 years agohdparm: more robust (re overflows) code. +38 bytes.
vda [Fri, 28 Sep 2007 13:38:08 +0000 (13:38 +0000)]
hdparm: more robust (re overflows) code. +38 bytes.

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

13 years agotrivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>
vda [Fri, 28 Sep 2007 11:37:38 +0000 (11:37 +0000)]
trivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>

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

13 years agohdparm: reduce possibility of numeric overflow in -T.
vda [Fri, 28 Sep 2007 11:21:47 +0000 (11:21 +0000)]
hdparm: reduce possibility of numeric overflow in -T.

do_time                                              386     410     +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 24/0)               Total: 24 bytes

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

13 years agoassorted static vars removal
vda [Fri, 28 Sep 2007 10:29:17 +0000 (10:29 +0000)]
assorted static vars removal

function                                             old     new   delta
tcpudpsvd_main                                      1829    1839     +10
update_status                                        567     569      +2
sigterm                                                1       -      -1
.........
dhcprelay_signal_handler                               8       -      -8
nfs_strerror                                          60      49     -11
singlemount                                         4579    4564     -15
static.p                                              16       -     -16
svstatus                                              20       -     -20
dhcprelay_xid_list                                    32       -     -32
runsv_main                                          1785    1746     -39
static.buf                                            74      28     -46
svd                                                   56       -     -56
dhcprelay_main                                      1141    1080     -61
------------------------------------------------------------------------------
(add/remove: 0/20 grow/shrink: 2/10 up/down: 12/-386)        Total: -374 bytes

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

13 years agohdparm: simplify timing measurement (it wa the last last user
vda [Fri, 28 Sep 2007 10:28:03 +0000 (10:28 +0000)]
hdparm: simplify timing measurement (it wa the last last user
of setitimer in the tree).

static.thousand                                       16       -     -16
read_big_block                                        81      46     -35
getitimer                                             41       -     -41
setitimer                                             47       -     -47
__GI_setitimer                                        47       -     -47
do_time                                              480     386     -94
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-280)           Total: -280 bytes

M    miscutils/hdparm.c

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

13 years agohdparm: get rid of static variables
vda [Fri, 28 Sep 2007 10:25:32 +0000 (10:25 +0000)]
hdparm: get rid of static variables

process_dev                                         5309    5311      +2
unregister_hwif                                        1       -      -1
...........
Xreadahead                                             4       -      -4
seek_to_zero                                          25      17      -8
hdparm_main                                         1242    1227     -15
do_time                                              547     480     -67
------------------------------------------------------------------------------
(add/remove: 0/83 grow/shrink: 1/3 up/down: 2/-248)          Total: -246 bytes

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

13 years agolibbb: make const_int_0 reside in rodata
vda [Thu, 27 Sep 2007 20:49:57 +0000 (20:49 +0000)]
libbb: make const_int_0 reside in rodata

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

13 years agolibbb: align bb_common_bufsiz1 to "long long"
vda [Thu, 27 Sep 2007 20:46:08 +0000 (20:46 +0000)]
libbb: align bb_common_bufsiz1 to "long long"

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

13 years agoless: make 'f' page forward
vda [Thu, 27 Sep 2007 17:11:48 +0000 (17:11 +0000)]
less: make 'f' page forward

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

13 years agowget: -O FILE is allowed to overwrite existing file (compat)
vda [Thu, 27 Sep 2007 15:07:23 +0000 (15:07 +0000)]
wget: -O FILE is allowed to overwrite existing file (compat)

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

13 years agozcip: fix unaligned trap on ARM
vda [Thu, 27 Sep 2007 11:15:42 +0000 (11:15 +0000)]
zcip: fix unaligned trap on ARM

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

13 years agoremove stray '/*' within comment
vda [Thu, 27 Sep 2007 10:26:59 +0000 (10:26 +0000)]
remove stray '/*' within comment

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

13 years agohdparm: use fixed fd #3 for device being interrogated
vda [Thu, 27 Sep 2007 10:23:34 +0000 (10:23 +0000)]
hdparm: use fixed fd #3 for device being interrogated
(surprisingly, on i386 almost no code size change)

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

13 years agointroduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
vda [Thu, 27 Sep 2007 10:20:47 +0000 (10:20 +0000)]
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).

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

13 years agostyle and message text fixes
vda [Thu, 27 Sep 2007 10:17:53 +0000 (10:17 +0000)]
style and message text fixes

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

13 years agolineedit: plug memory leak
vda [Thu, 27 Sep 2007 10:17:16 +0000 (10:17 +0000)]
lineedit: plug memory leak

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

13 years agovlock: get rid of statics
vda [Thu, 27 Sep 2007 10:12:02 +0000 (10:12 +0000)]
vlock: get rid of statics

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

13 years agointroduce safe_poll (fixes a problem in top)
vda [Thu, 27 Sep 2007 10:09:59 +0000 (10:09 +0000)]
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

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

13 years agomake variables static
vda [Thu, 27 Sep 2007 10:08:02 +0000 (10:08 +0000)]
make variables static

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

13 years agocheck-lxdialog.sh: no point in giving up, maybe -lcurses will work?
vda [Wed, 26 Sep 2007 18:18:59 +0000 (18:18 +0000)]
check-lxdialog.sh: no point in giving up, maybe -lcurses will work?

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

13 years agoload_policy: update (Yuichi Nakamura <ynakam@hitachisoft.jp>)
vda [Wed, 26 Sep 2007 18:01:32 +0000 (18:01 +0000)]
load_policy: update (Yuichi Nakamura <ynakam@hitachisoft.jp>)

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

13 years agochcon: trivial fix
vda [Wed, 26 Sep 2007 17:55:55 +0000 (17:55 +0000)]
chcon: trivial fix

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

13 years agolosetup: support -f (Loic Grenie <loic.grenie@gmail.com>)
vda [Wed, 26 Sep 2007 17:54:18 +0000 (17:54 +0000)]
losetup: support -f (Loic Grenie <loic.grenie@gmail.com>)

function                                             old     new   delta
losetup_main                                         238     278     +40
packed_usage                                       23021   23027      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0)               Total: 46 bytes

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

13 years agorunsvdir: fix "linear wait time" bug
vda [Wed, 26 Sep 2007 12:18:07 +0000 (12:18 +0000)]
runsvdir: fix "linear wait time" bug

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

13 years agoinetd: move struct fields around -> save .25 k of code
vda [Wed, 26 Sep 2007 10:46:18 +0000 (10:46 +0000)]
inetd: move struct fields around -> save .25 k of code

function                                             old     new   delta
freeconfig                                            75      76      +1
register_rpc                                         200     196      -4
dupconfig                                            165     159      -6
reapchild                                            173     166      -7
retry                                                 93      82     -11
goaway                                               112     101     -11
getconfigent                                        1241    1222     -19
setup                                                645     592     -53
inetd_main                                          2160    2107     -53
config                                              1602    1518     -84
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/9 up/down: 1/-248)           Total: -247 bytes
   text    data     bss     dec     hex filename
 773951    1038   10332  785321   bfba9 busybox_old
 773703    1038   10332  785073   bfab1 busybox_unstripped

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

13 years agoinstall: fix bug in "install -c file dir" (tries to copy dir into dir too)
vda [Wed, 26 Sep 2007 10:34:54 +0000 (10:34 +0000)]
install: fix bug in "install -c file dir" (tries to copy dir into dir too)
install: 'support' (ignore) -v and -b

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

13 years agodocumentation bits in comments, no code changes
vda [Tue, 25 Sep 2007 18:35:28 +0000 (18:35 +0000)]
documentation bits in comments, no code changes

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

13 years agocp: -r and -R imply -d (coreutils compat)
vda [Tue, 25 Sep 2007 18:06:36 +0000 (18:06 +0000)]
cp: -r and -R imply -d (coreutils compat)

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

13 years agohttpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>)
vda [Tue, 25 Sep 2007 11:58:33 +0000 (11:58 +0000)]
httpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>)

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

13 years agoed: large cleanup
vda [Tue, 25 Sep 2007 11:55:57 +0000 (11:55 +0000)]
ed: large cleanup

function                                             old     new   delta
bad_nums                                               -      43     +43
skip_blank                                             -      24     +24
getNum                                               557     578     +21
insertLine                                           159     163      +4
setCurNum                                             31      33      +2
lastNum                                                4       -      -4
fileName                                               4       -      -4
dirty                                                  4       -      -4
curNum                                                 4       -      -4
curLine                                                4       -      -4
bufUsed                                                4       -      -4
bufSize                                                4       -      -4
bufPtr                                                 4       -      -4
bufBase                                                4       -      -4
printLines                                           357     345     -12
findLine                                             165     152     -13
lines                                                 16       -     -16
deleteLines                                          203     144     -59
readLines                                            538     473     -65
addLines                                             163      87     -76
marks                                                104       -    -104
termEdit                                             140       -    -140
ed_main                                             3125    2654    -471
------------------------------------------------------------------------------
(add/remove: 2/12 grow/shrink: 3/6 up/down: 94/-992)         Total: -898 bytes
   text    data     bss     dec     hex filename
 771142    1034   10564  782740   bf194 busybox_old
 770265    1034   10404  781703   bed87 busybox_unstripped

# size */ed.o
   text    data     bss     dec     hex filename
   6370       0     156    6526    197e editors.org/ed.o
   5505       0       0    5505    1581 editors/ed.o

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

13 years agoinsmod: fix help text to not show options if only 2.6 was selected
vda [Mon, 24 Sep 2007 20:14:32 +0000 (20:14 +0000)]
insmod: fix help text to not show options if only 2.6 was selected

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

13 years agoinsmod: shorten message text; style fixes
vda [Mon, 24 Sep 2007 19:54:36 +0000 (19:54 +0000)]
insmod: shorten message text; style fixes

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

13 years agotar: add a comment about previous subtle fix
vda [Mon, 24 Sep 2007 19:32:53 +0000 (19:32 +0000)]
tar: add a comment about previous subtle fix

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

13 years agotar: strip leading '/' BEFORE memorizing hardlink's name
vda [Mon, 24 Sep 2007 19:07:57 +0000 (19:07 +0000)]
tar: strip leading '/' BEFORE memorizing hardlink's name

function                                             old     new   delta
writeFileToTarball                                  1362    1352     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10)             Total: -10 bytes

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

13 years agoash: fix prompt expansion (Natanael Copa <natanael.copa@gmail.com>)
vda [Mon, 24 Sep 2007 18:30:02 +0000 (18:30 +0000)]
ash: fix prompt expansion (Natanael Copa <natanael.copa@gmail.com>)

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

13 years ago*: kill bb_get_last_path_component, replace with two functions
vda [Mon, 24 Sep 2007 18:27:04 +0000 (18:27 +0000)]
*: 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

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

13 years agowget: get rid of setitimer
vda [Mon, 24 Sep 2007 18:25:08 +0000 (18:25 +0000)]
wget: get rid of setitimer
   text    data     bss     dec     hex filename
   5110       1       0    5111    13f7 busybox.t3/networking/wget.o
   5056       1       0    5057    13c1 busybox.t4/networking/wget.o

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

13 years agowget: reorder functions, no code changes
vda [Mon, 24 Sep 2007 18:24:17 +0000 (18:24 +0000)]
wget: reorder functions, no code changes

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

13 years agowget: code shrink, move data out of bss
vda [Mon, 24 Sep 2007 15:04:00 +0000 (15:04 +0000)]
wget: code shrink, move data out of bss

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

13 years agowget: allow dots in header field names.
vda [Mon, 24 Sep 2007 13:51:54 +0000 (13:51 +0000)]
wget: allow dots in header field names.
wget: code shrink

function                                             old     new   delta
gethdr                                               211     190     -21
wget_main                                           2609    2557     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-73)             Total: -73 bytes

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

13 years agoinetd: make some fields smaller, move data out of data/bss sections
vda [Mon, 24 Sep 2007 10:41:30 +0000 (10:41 +0000)]
inetd: make some fields smaller, move data out of data/bss sections

function                                             old     new   delta
inetd_main                                          2125    2160     +35
setup                                                640     645      +5
initring                                              48      53      +5
reapchild                                            169     173      +4
retry                                                 92      93      +1
goaway                                               113     112      -1
inetd_setproctitle                                   175     173      -2
chargen_dg                                           229     227      -2
uid                                                    4       -      -4
.......................
Argv                                                   4       -      -4
rlim_ofile_cur                                         8       -      -8
config                                              1610    1602      -8
rlim_ofile                                            16       -     -16
getconfigent                                        1271    1241     -30
builtins                                             176     132     -44
ring                                                 128       -    -128
allsock                                              128       -    -128
------------------------------------------------------------------------------
(add/remove: 0/18 grow/shrink: 5/6 up/down: 50/-423)         Total: -373 bytes
   text    data     bss     dec     hex filename
 774144    1051   10708  785903   bfdef busybox_old
 774108    1039   10380  785527   bfc77 busybox_unstripped
$ size inetd.o inetd_orig.o
   text    data     bss     dec     hex filename
   9027       0       0    9027    2343 inetd.o
   9064      12     324    9400    24b8 inetd_orig.o

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

13 years agorun_parts: make it sort executables by name (required by API)
vda [Sun, 23 Sep 2007 18:34:49 +0000 (18:34 +0000)]
run_parts: make it sort executables by name (required by API)

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

13 years agomake fdisk compile on libc without llseek64
vda [Sun, 23 Sep 2007 14:05:54 +0000 (14:05 +0000)]
make fdisk compile on libc without llseek64

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

13 years agohttpd: simplify CGI i/o loop. -200 bytes.
vda [Sun, 23 Sep 2007 13:56:57 +0000 (13:56 +0000)]
httpd: simplify CGI i/o loop. -200 bytes.

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

13 years agoinclude libbb.h, not busybox.h
vda [Sat, 22 Sep 2007 21:37:27 +0000 (21:37 +0000)]
include libbb.h, not busybox.h

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

13 years ago- actually mv microcom.c to miscutils
aldot [Sat, 22 Sep 2007 21:18:46 +0000 (21:18 +0000)]
- actually mv microcom.c to miscutils

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

13 years ago- add microcom to defconfig
aldot [Sat, 22 Sep 2007 21:13:17 +0000 (21:13 +0000)]
- add microcom to defconfig

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

13 years agomove microcom to miscutils
vda [Sat, 22 Sep 2007 20:51:41 +0000 (20:51 +0000)]
move microcom to miscutils

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

13 years ago- remove some trailing whitespace
aldot [Sat, 22 Sep 2007 20:35:32 +0000 (20:35 +0000)]
- remove some trailing whitespace

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

13 years agomicrocom: add copyright/license info
vda [Sat, 22 Sep 2007 20:23:57 +0000 (20:23 +0000)]
microcom: add copyright/license info

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

13 years agoash: remove erroneously applied patch
vda [Fri, 21 Sep 2007 22:48:02 +0000 (22:48 +0000)]
ash: remove erroneously applied patch

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

13 years agohttpd: optional support for partial downloads
vda [Fri, 21 Sep 2007 22:35:18 +0000 (22:35 +0000)]
httpd: optional support for partial downloads

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

13 years agoash: s/int/smallint/. -60 bytes.
vda [Fri, 21 Sep 2007 18:06:20 +0000 (18:06 +0000)]
ash: s/int/smallint/. -60 bytes.

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

13 years agotest: correct confusing placement of "const"
vda [Fri, 21 Sep 2007 17:58:43 +0000 (17:58 +0000)]
test: correct confusing placement of "const"

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

13 years agomicrocom: add new applet, this time for real
vda [Fri, 21 Sep 2007 17:42:40 +0000 (17:42 +0000)]
microcom: add new applet, this time for real

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

13 years agomicrocom: new applet by Vladimir Dronnikov <dronnikov@gmail.ru>
vda [Fri, 21 Sep 2007 13:43:28 +0000 (13:43 +0000)]
microcom: new applet by Vladimir Dronnikov <dronnikov@gmail.ru>

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

13 years agoupdate Glenn McGrath's email address
vda [Fri, 21 Sep 2007 13:16:32 +0000 (13:16 +0000)]
update Glenn McGrath's email address

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

13 years agoremove stray 8-bit chars from copyright banner
vda [Thu, 20 Sep 2007 19:44:10 +0000 (19:44 +0000)]
remove stray 8-bit chars from copyright banner

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

13 years agoannounce 1.7.1 on website
vda [Sun, 16 Sep 2007 19:41:40 +0000 (19:41 +0000)]
announce 1.7.1 on website

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

13 years agohttpd: do not clear environment
vda [Sat, 15 Sep 2007 13:28:30 +0000 (13:28 +0000)]
httpd: do not clear environment
mount: mount helpers support (by Vladimir Dronnikov <dronnikov@gmail.ru>)

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

13 years agowebpage: add a link to vda's "init must die" page
vda [Thu, 13 Sep 2007 20:20:44 +0000 (20:20 +0000)]
webpage: add a link to vda's "init must die" page

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

13 years agocp: make it a bit closer to POSIX, but still refuse to open and
vda [Tue, 11 Sep 2007 16:28:14 +0000 (16:28 +0000)]
cp: make it a bit closer to POSIX, but still refuse to open and
write to dest which is a symlink.

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

13 years agocp: make "cp file /dev/node" special case; explained in comments
vda [Tue, 11 Sep 2007 10:39:13 +0000 (10:39 +0000)]
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

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

13 years agorun_shell: code shrink for selinux
vda [Mon, 10 Sep 2007 17:17:01 +0000 (17:17 +0000)]
run_shell: code shrink for selinux

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

13 years agosetup_environment: code shrink
vda [Mon, 10 Sep 2007 13:15:28 +0000 (13:15 +0000)]
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

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

13 years agogrep: delete obsolete comment
vda [Mon, 10 Sep 2007 12:23:27 +0000 (12:23 +0000)]
grep: delete obsolete comment

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

13 years agogrep: fix grep -F -e str1 -e str2 (was matching str2 only)
vda [Mon, 10 Sep 2007 12:18:32 +0000 (12:18 +0000)]
grep: fix grep -F -e str1 -e str2 (was matching str2 only)
  by replacing "=" by "|=" here:
  found |= strstr(line, gl->pattern) != NULL;
grep: optimization: stop on first -e match
grep: stop using bss. -40 bytes

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

13 years agostyle fix, no code changes
vda [Sun, 9 Sep 2007 14:11:11 +0000 (14:11 +0000)]
style fix, no code changes

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

13 years agoopen_transformer: fix vda's goofup
vda [Sun, 9 Sep 2007 11:20:55 +0000 (11:20 +0000)]
open_transformer: fix vda's goofup

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

13 years agotop: small fix for command line wrapping
vda [Sat, 8 Sep 2007 17:42:00 +0000 (17:42 +0000)]
top: small fix for command line wrapping

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

13 years agotop: get rid of on-stack variable buffers, use permanent one.
vda [Sat, 8 Sep 2007 17:34:05 +0000 (17:34 +0000)]
top: get rid of on-stack variable buffers, use permanent one.
code shrank with and without TOPMEM:

top_main                                             828     844     +16
display_process_list                                1525    1473     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-52)            Total: -36 bytes

top_main                                            1150    1171     +21
display_topmem_process_list                         1150    1167     +17
display_process_list                                1525    1473     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 38/-52)            Total: -14 bytes

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

13 years agotop: add sizeof(G) check; fix style
vda [Sat, 8 Sep 2007 17:21:01 +0000 (17:21 +0000)]
top: add sizeof(G) check; fix style

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

13 years agotop: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,
vda [Sat, 8 Sep 2007 16:51:19 +0000 (16:51 +0000)]
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).

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

13 years agooverload the existing '-q' flag so that if '-l' and '-q' are used
pgf [Fri, 7 Sep 2007 20:28:25 +0000 (20:28 +0000)]
overload the existing '-q' flag so that if '-l' and '-q' are used
together, a "short form" listing (just pathnames) is generated.
change a few flag variables to "smallint" as well.

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

13 years agomessages: by popular request allow PATH to be customized at build time
vda [Fri, 7 Sep 2007 19:33:56 +0000 (19:33 +0000)]
messages: by popular request allow PATH to be customized at build time
mount: smallish code shrink

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

13 years agosyslogd: do not need to poll(), we can just block in read().
vda [Fri, 7 Sep 2007 13:53:32 +0000 (13:53 +0000)]
syslogd: do not need to poll(), we can just block in read().

function                                             old     new   delta
syslogd_main                                        1206    1106    -100
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-100)           Total: -100 bytes
   text    data     bss     dec     hex filename
 769820    1051   10764  781635   bed43 busybox_old
 769702    1051   10764  781517   beccd busybox_unstripped

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

13 years ago*: replace select-for-one descriptor with poll, it's smaller.
vda [Fri, 7 Sep 2007 13:43:28 +0000 (13:43 +0000)]
*: replace select-for-one descriptor with poll, it's smaller.

$ ./.cmk bloatcheck
function                                             old     new   delta
readit                                               406     364     -42
syslogd_main                                        1249    1206     -43
traceroute_main                                     4115    4060     -55
mysleep                                              112      45     -67
arpping                                              579     441    -138
tftp                                                1575    1182    -393
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-738)           Total: -738 bytes
   text    data     bss     dec     hex filename
 770580    1051   10764  782395   bf03b busybox_old
 769820    1051   10764  781635   bed43 busybox_unstripped

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

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