oweals/busybox.git
16 years agoclean up TODO file. No real code changes.
Denis Vlasenko [Mon, 17 Mar 2008 09:05:21 +0000 (09:05 -0000)]
clean up TODO file. No real code changes.

16 years ago*: fix fallout from -Wunused-parameter
Denis Vlasenko [Mon, 17 Mar 2008 09:04:04 +0000 (09:04 -0000)]
*: fix fallout from -Wunused-parameter

function                                             old     new   delta
bbunpack                                             358     366      +8
passwd_main                                         1070    1072      +2
handle_incoming_and_exit                            2651    2653      +2
getpty                                                88      86      -2
script_main                                          975     972      -3
inetd_main                                          2036    2033      -3
dname_enc                                            377     373      -4
make_new_session                                     474     462     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24)            Total: -12 bytes
   text    data     bss     dec     hex filename
 797429     658    7428  805515   c4a8b busybox_old
 797417     658    7428  805503   c4a7f busybox_unstripped

16 years agodnsd: properly set _src_ IP:port on outgoing UDP packets
Denis Vlasenko [Mon, 17 Mar 2008 09:02:21 +0000 (09:02 -0000)]
dnsd: properly set _src_ IP:port on outgoing UDP packets

function                                             old     new   delta
send_to_from                                           -     258    +258
dnsd_main                                           1500    1568     +68
interrupt                                             17      19      +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 328/0)             Total: 328 bytes
   text    data     bss     dec     hex filename
 797101     658    7428  805187   c4943 busybox_old
 797429     658    7428  805515   c4a8b busybox_unstripped

16 years ago*: add -Wunused-parameter; fix resulting breakage
Denis Vlasenko [Mon, 17 Mar 2008 09:00:54 +0000 (09:00 -0000)]
*: add -Wunused-parameter; fix resulting breakage

function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped

16 years agofsck: shrink (we were passing around some params which were unused)
Denis Vlasenko [Mon, 17 Mar 2008 08:59:19 +0000 (08:59 -0000)]
fsck: shrink (we were passing around some params which were unused)

function                                             old     new   delta
fsck_main                                           1807    2256    +449
fsck_device                                          196     189      -7
create_fs_device                                     131     124      -7
wait_one                                             325     309     -16
wait_many                                             52      33     -19
free_instance                                         38       -     -38
packed_usage                                       23698   23650     -48
execute                                             2508    2402    -106
check_all                                            609       -    -609
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/6 up/down: 449/-850)         Total: -401 bytes
   text    data     bss     dec     hex filename
 797604     658    7428  805690   c4b3a busybox_old
 797195     658    7428  805281   c49a1 busybox_unstripped

16 years agohelp text: regularize format, and shrink
Denis Vlasenko [Mon, 17 Mar 2008 08:55:44 +0000 (08:55 -0000)]
help text: regularize format, and shrink
getty: shrink, and improve comments
mount: OPT_ALL is superfluous, we already have OPT_a

function                                             old     new   delta
bcode                                                 47      25     -22
getty_main                                          2503    2349    -154
packed_usage                                       23928   23698    -230
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-406)           Total: -406 bytes
   text    data     bss     dec     hex filename
 798031     658    7428  806117   c4ce5 busybox_old
 797604     658    7428  805690   c4b3a busybox_unstripped

16 years agomount: plug a hole where FEATURE_MOUNT_HELPERS could allow execution
Denis Vlasenko [Mon, 17 Mar 2008 08:46:43 +0000 (08:46 -0000)]
mount: plug a hole where FEATURE_MOUNT_HELPERS could allow execution
of arbitrary command.

function                                             old     new   delta
mount_it_now                                         266     309     +43

16 years agofuser: bugfixes and shrink. It was assuming that xmalloc zeroes returned area!
Denis Vlasenko [Mon, 17 Mar 2008 08:44:58 +0000 (08:44 -0000)]
fuser: bugfixes and shrink. It was assuming that xmalloc zeroes returned area!

function                                             old     new   delta
scan_dir_links                                         -     106    +106
add_inode                                              -      89     +89
scan_link                                              -      78     +78
file_to_dev_inode                                      -      64     +64
search_dev_inode                                       -      63     +63
add_pid                                                -      39     +39
packed_usage                                       23948   23928     -20
fuser_add_pid                                         49       -     -49
fuser_file_to_dev_inode                               64       -     -64
fuser_search_dev_inode                                77       -     -77
fuser_scan_link                                       91       -     -91
fuser_scan_dir_links                                 108       -    -108
fuser_add_inode                                      124       -    -124
fuser_main                                          1450    1243    -207
------------------------------------------------------------------------------
(add/remove: 6/6 grow/shrink: 0/2 up/down: 439/-740)         Total: -301 bytes
   text    data     bss     dec     hex filename
 798327     658    7428  806413   c4e0d busybox_old
 797988     658    7428  806074   c4cba busybox_unstripped

16 years agodos2unix: tiny shrink
Denis Vlasenko [Mon, 17 Mar 2008 08:42:43 +0000 (08:42 -0000)]
dos2unix: tiny shrink
login,su: fix setup_environment() so that it works as intended
          (parameter names were a bit misleading)
fdisk: shrink
help text: shrink

function                                             old     new   delta
login_main                                          1658    1701     +43
setup_environment                                    206     203      -3
dos_compatible_flag                                    4       1      -3
dos2unix_main                                        383     375      -8
get_boot                                            1724    1702     -22
fdisk_main                                          2949    2889     -60
packed_usage                                       24250   23948    -302
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 43/-398)          Total: -355 bytes
   text    data     bss     dec     hex filename
 798768     661    7428  806857   c4fc9 busybox_old
 798327     658    7428  806413   c4e0d busybox_unstripped

16 years agoless: improve search when data is not supplied fast enough by stdin -
Denis Vlasenko [Mon, 17 Mar 2008 08:38:45 +0000 (08:38 -0000)]
less: improve search when data is not supplied fast enough by stdin -
now will try reading for 1-2 seconds before declaring that there is no match.
This fixes a very common annoyance with long manpages.

function                                             old     new   delta
read_lines                                           653     719     +66
buffer_down                                           28      83     +55
goto_match                                           140     141      +1
cap_cur_fline                                         72       -     -72
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/0 up/down: 122/-72)            Total: 50 bytes
   text    data     bss     dec     hex filename
 798734     661    7428  806823   c4fa7 busybox_old
 798768     661    7428  806857   c4fc9 busybox_unstripped

16 years agotcpsvd,udpsvd: make them NOMMU-capable
Denis Vlasenko [Mon, 17 Mar 2008 08:35:44 +0000 (08:35 -0000)]
tcpsvd,udpsvd: make them NOMMU-capable
inetd: make udp nowait work

function                                             old     new   delta
inetd_main                                          1797    2036    +239
tcpudpsvd_main                                      1839    1973    +134
xsetenv_plain                                          -      39     +39
xsetenv_proto                                         23      40     +17
bump_nofile                                          169     170      +1
sig_term_handler                                      72      69      -3
sig_child_handler                                    239     233      -6
connection_status                                     37      31      -6
parse_one_line                                      1102    1092     -10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/4 up/down: 430/-25)           Total: 405 bytes
   text    data     bss     dec     hex filename
 798437     661    7428  806526   c4e7e busybox_old
 798734     661    7428  806823   c4fa7 busybox_unstripped

16 years agofsck_minix: getopt32-ification; code shrink; reduce stack usage;
Denis Vlasenko [Mon, 17 Mar 2008 08:32:26 +0000 (08:32 -0000)]
fsck_minix: getopt32-ification; code shrink; reduce stack usage;
fix bug in map_block2: s/(blknr >= 256 * 256)/(blknr < 256 * 256)/

function                                             old     new   delta
get_inode_common                                       -     291    +291
add_zone_common                                        -     205    +205
ask                                                  229     215     -14
write_super_block                                    109      90     -19
write_block                                          653     629     -24
bad_zone                                              95      64     -31
read_block                                           241     198     -43
fsck_minix_main                                     3285    3195     -90
add_zone2                                            217      34    -183
add_zone                                             216      33    -183
recursive_check                                     1097     866    -231
recursive_check2                                    1340     956    -384
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/10 up/down: 496/-1202)       Total: -706 bytes
   text    data     bss     dec     hex filename
 799349     661    7428  807438   c520e busybox_old
 798437     661    7428  806526   c4e7e busybox_unstripped

16 years agolibbb: introduce and use sigprocmask_allsigs and sigaction_set.
Denis Vlasenko [Mon, 17 Mar 2008 08:29:08 +0000 (08:29 -0000)]
libbb: introduce and use sigprocmask_allsigs and sigaction_set.
libbb: rename sig_pause to wait_for_any_sig.

16 years agolibbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_set
Denis Vlasenko [Wed, 12 Mar 2008 23:19:35 +0000 (23:19 -0000)]
libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_set

signal_SA_RESTART_empty_mask                           -      65     +65
signal_no_SA_RESTART_empty_mask                        -      54     +54
dd_main                                             1325    1369     +44
sigaction_set                                          -      19     +19
dname_enc                                            373     377      +4
UNSPEC_print                                          64      66      +2
setsignal                                            296     294      -2
bb_signals_recursive                                  95      92      -3
bb_askpass                                           367     361      -6
inetd_main                                          1810    1797     -13
rx_main                                              912     883     -29
sigdelset                                             32       -     -32
__sigdelset                                           32       -     -32
__GI_sigdelset                                        32       -     -32
sighup_handler                                        84      37     -47
arping_main                                         1844    1797     -47
fsck_main                                           1869    1807     -62
run_list                                            1917    1844     -73
vlock_main                                           492     409     -83
progressmeter                                        883     798     -85
handle_incoming_and_exit                            2737    2651     -86
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632)        Total: -444 bytes

16 years agonc: remove a bit of bloat
Denis Vlasenko [Wed, 12 Mar 2008 23:13:50 +0000 (23:13 -0000)]
nc: remove a bit of bloat
inetd: more NOMMU fixes
rx: shrink
devfsd: minor shrink
vlock: shrink
tcpudp: narrow down window where we have no wildcard socket

parse_one_line                                      1015    1102     +87
init_ring                                              -      53     +53
xzalloc_lsa                                            -      48     +48
read_byte                                             51      50      -1
rearm_alarm                                           28      25      -3
nc_main                                             1028    1000     -28
initring                                              53       -     -53
vlock_main                                           583     496     -87
reread_config_file                                  1089     991     -98
rx_main                                             1046     912    -134
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/6 up/down: 188/-404)         Total: -216 bytes
   text    data     bss     dec     hex filename
 800120     661    7428  808209   c5511 busybox_old
 799796     661    7428  807885   c53cd busybox_unstripped

16 years agoinetd: make it NOMMU-capable and IPv6-friendly. Lots of renames
Denis Vlasenko [Wed, 12 Mar 2008 22:14:34 +0000 (22:14 -0000)]
inetd: make it NOMMU-capable and IPv6-friendly. Lots of renames
of variable/function names

Total: -2474 bytes
   text    data     bss     dec     hex filename
 802215     661    7452  810328   c5d58 busybox_old
 800120     661    7428  808209   c5511 busybox_unstripped

16 years agocrond: make it NOMMU-capable
Denis Vlasenko [Wed, 12 Mar 2008 22:10:25 +0000 (22:10 -0000)]
crond: make it NOMMU-capable

function                                             old     new   delta
safe_setenv4                                           -      62     +62
ForkJob                                              472     511     +39
change_identity                                       21      57     +36
ParseField                                           564     571      +7
SynchronizeDir                                       178     176      -2
LogLevel                                               4       -      -4
LogFile                                                4       -      -4
FileBase                                               4       -      -4
DebugOpt                                               4       -      -4
CDir                                                   4       -      -4
DeleteFile                                           141     132      -9
packed_usage                                       24248   24228     -20
crondlog                                             157     113     -44
change_identity_e2str                                 54       -     -54
SynchronizeFile                                      729     671     -58
crond_main                                          1555    1404    -151
------------------------------------------------------------------------------
(add/remove: 1/6 grow/shrink: 3/6 up/down: 144/-358)         Total: -214 bytes

16 years agofixups to vi usage, and move the initial redraw() past the
Paul Fox [Thu, 6 Mar 2008 16:26:12 +0000 (16:26 -0000)]
fixups to vi usage, and move the initial redraw() past the
execution of commands supplied by -c or EXINIT, so their
effect is displayed correctly.

16 years agofixed the "dot" (i.e. '.') command, to properly re-init its
Paul Fox [Thu, 6 Mar 2008 01:34:23 +0000 (01:34 -0000)]
fixed the "dot" (i.e.  '.') command, to properly re-init its
buffer between commands, not recalculate its length all the time,
and to not reallocate its fixed-length buffer frequently.

fixed the 'c', 'd', and 'y' commands to properly handle both motions
that are just part of a line, and those that are multiline.  for
instance, now "c%" and "2cw" work correctly, whether the motions span
lines or not.

added some permissble motions for 'c', 'd', and 'y':  namely 'h',
'l', SPACE, BS, and DEL

16 years agodefine DEBUG as 0, for when ENABLE_FEATURE_DEVPTS is not on.
Paul Fox [Wed, 5 Mar 2008 22:01:45 +0000 (22:01 -0000)]
define DEBUG as 0, for when ENABLE_FEATURE_DEVPTS is not on.

16 years agofix vi's '?' and '/' commands to correctly set a new direction
Paul Fox [Wed, 5 Mar 2008 16:44:02 +0000 (16:44 -0000)]
fix vi's '?' and '/' commands to correctly set a new direction
when reusing a previous search pattern.  previously only 'n' and 'N'
reversed directions properly.

16 years agomsh: create testsuite (based on hush one)
Denis Vlasenko [Sun, 2 Mar 2008 19:57:53 +0000 (19:57 -0000)]
msh: create testsuite (based on hush one)
hush: add TODO (doesn't know ":" command)

16 years agounlzma: save a few more bytes, and maybe even a bit faster now
Denis Vlasenko [Sun, 2 Mar 2008 18:56:23 +0000 (18:56 -0000)]
unlzma: save a few more bytes, and maybe even a bit faster now

16 years agounlzma: if !LZMA_FAST, save ~200 more bytes (Pascal Bellard <pascal.bellard AT ads...
Denis Vlasenko [Sun, 2 Mar 2008 18:55:49 +0000 (18:55 -0000)]
unlzma: if !LZMA_FAST, save ~200 more bytes (Pascal Bellard <pascal.bellard AT ads-lu.com>)

16 years agomsh: a few fields renamed; short->int conversion for a field
Denis Vlasenko [Sun, 2 Mar 2008 14:33:26 +0000 (14:33 -0000)]
msh: a few fields renamed; short->int conversion for a field
  holding file descriptors; short->smalling for flag field

synio                                                263     264      +1
readc                                                247     242      -5
forkexec                                            1339    1307     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-37)             Total: -36 bytes

16 years agoactually add bb_qsort.c
Denis Vlasenko [Sun, 2 Mar 2008 12:53:15 +0000 (12:53 -0000)]
actually add bb_qsort.c
*: s/Denis/Denys/

16 years agolibbb: inntroduce and use bb_pstrcmp() and qsort_string_vector()
Denis Vlasenko [Sun, 2 Mar 2008 12:51:26 +0000 (12:51 -0000)]
libbb: inntroduce and use bb_pstrcmp() and qsort_string_vector()
msh: glob0/glob1/glob2/glob3 are just a sorting routine! remove them.

bb_pstrcmp                                             -      25     +25
qsort_string_vector                                    -      24     +24
expand                                              2209    2227     +18
getopt32                                            1359    1370     +11
passwd_main                                         1072    1074      +2
handle_incoming_and_exit                            2737    2735      -2
UNSPEC_print                                          66      64      -2
forkexec                                            1343    1339      -4
input_tab                                           3338    3330      -8
get_dir                                              185     177      -8
expmeta                                              481     473      -8
cmdputs                                              405     397      -8
xstrcmp                                               12       -     -12
find_pair                                            187     167     -20
match_compare                                         25       -     -25
dir_strcmp                                            25       -     -25
glob2                                                 27       -     -27
glob3                                                 34       -     -34
glob1                                                256       -    -256
------------------------------------------------------------------------------
(add/remove: 2/6 grow/shrink: 3/8 up/down: 80/-439)          Total: -359 bytes

16 years agomsh: renames: ->words => ->op_words, space() => get_space()
Denis Vlasenko [Sun, 2 Mar 2008 12:49:39 +0000 (12:49 -0000)]
msh: renames: ->words => ->op_words, space() => get_space()
msh: simplify glob0/glob1/glob2/glob3

get_space                                              -      26     +26
glob3                                                 35      34      -1
glob2                                                 28      27      -1
strsave                                               55      53      -2
globv                                                  4       -      -4
func                                                   4       -      -4
xstrcmp                                               25      12     -13
dodot                                                178     164     -14
rexecve                                              272     257     -15
space                                                 26       -     -26
glob1                                                292     256     -36
expand                                              2246    2209     -37
------------------------------------------------------------------------------
(add/remove: 1/3 grow/shrink: 0/8 up/down: 26/-153)          Total: -127 bytes

16 years agodoc: add info about sed s/.../.../I modifier
Denis Vlasenko [Sat, 1 Mar 2008 19:29:56 +0000 (19:29 -0000)]
doc: add info about sed s/.../.../I modifier

16 years agomsh: fix for bug 846 ("break" didn't work second time)
Denis Vlasenko [Sat, 1 Mar 2008 09:35:39 +0000 (09:35 -0000)]
msh: fix for bug 846 ("break" didn't work second time)
msh: don't use floating point in "times" builtin
+4 bytes difference

16 years agonmeter: fix bug where %[mf] behaves as %[mt]
Denis Vlasenko [Fri, 29 Feb 2008 07:46:19 +0000 (07:46 -0000)]
nmeter: fix bug where %[mf] behaves as %[mt]

16 years agorun-parts: add --reverse
Denis Vlasenko [Thu, 28 Feb 2008 21:30:22 +0000 (21:30 -0000)]
run-parts: add --reverse

16 years agozcip: chdiring to root when daemonizing is not useful,
Denis Vlasenko [Thu, 28 Feb 2008 18:02:23 +0000 (18:02 -0000)]
zcip: chdiring to root when daemonizing is not useful,
only makes strip writer's life more miserable. Who want
to have zcip run in root dir, can trivially do that.

16 years agosed: n cmd must reset "we had successful subst" flag. closes bug 1214.
Denis Vlasenko [Thu, 28 Feb 2008 17:59:01 +0000 (17:59 -0000)]
sed: n cmd must reset "we had successful subst" flag. closes bug 1214.

16 years agomicrocom: shrink
Denis Vlasenko [Thu, 28 Feb 2008 13:14:42 +0000 (13:14 -0000)]
microcom: shrink

16 years agoscript: correctly handle buffered "tail" of output. +35 bytes.
Denis Vlasenko [Thu, 28 Feb 2008 10:10:10 +0000 (10:10 -0000)]
script: correctly handle buffered "tail" of output. +35 bytes.

16 years ago- Don't point to obsolete patches but the current fixes for the stable releases
Bernhard Reutner-Fischer [Wed, 27 Feb 2008 21:42:13 +0000 (21:42 -0000)]
- Don't point to obsolete patches but the current fixes for the stable releases

16 years ago- update docs to point to the current stable branch
Bernhard Reutner-Fischer [Wed, 27 Feb 2008 21:28:02 +0000 (21:28 -0000)]
- update docs to point to the current stable branch

16 years ago- fix compilation failure due to implicit decl of resolve_mount_spec().
Bernhard Reutner-Fischer [Wed, 27 Feb 2008 21:14:52 +0000 (21:14 -0000)]
- fix compilation failure due to implicit decl of resolve_mount_spec().
  DCE DTRT so remove the wrong guard.

16 years agohttpd: fix breakage introduced by "support for I:index.xml"
Denis Vlasenko [Wed, 27 Feb 2008 20:59:54 +0000 (20:59 -0000)]
httpd: fix breakage introduced by "support for I:index.xml"

16 years ago*: add optimization barrier to all "G trick" locations
Denis Vlasenko [Wed, 27 Feb 2008 18:41:59 +0000 (18:41 -0000)]
*: add optimization barrier to all "G trick" locations

16 years agolpr: removed stdio; added "job received" message in verbose mode.
Denis Vlasenko [Wed, 27 Feb 2008 14:35:21 +0000 (14:35 -0000)]
lpr: removed stdio; added "job received" message in verbose mode.

16 years agolibbb: add forgotten part of "script" applet change
Denis Vlasenko [Wed, 27 Feb 2008 14:33:28 +0000 (14:33 -0000)]
libbb: add forgotten part of "script" applet change

16 years agoscript: new applet by Pascal Bellard <pascal.bellard AT ads-lu.com>
Denis Vlasenko [Wed, 27 Feb 2008 11:54:59 +0000 (11:54 -0000)]
script: new applet by Pascal Bellard <pascal.bellard AT ads-lu.com>

16 years agosendmail: yet another maintainer's update
Denis Vlasenko [Wed, 27 Feb 2008 09:39:04 +0000 (09:39 -0000)]
sendmail: yet another maintainer's update

16 years agosendmail: update from maintainer
Denis Vlasenko [Tue, 26 Feb 2008 21:13:17 +0000 (21:13 -0000)]
sendmail: update from maintainer

16 years agolpr: fflush stdout fix
Denis Vlasenko [Tue, 26 Feb 2008 20:23:02 +0000 (20:23 -0000)]
lpr: fflush stdout fix

16 years agosyslogd: optional support for dropping dups. closes bug 436.
Denis Vlasenko [Tue, 26 Feb 2008 20:13:52 +0000 (20:13 -0000)]
syslogd: optional support for dropping dups. closes bug 436.

16 years agoifenslave: new applet. closes bug 115.
Denis Vlasenko [Tue, 26 Feb 2008 18:25:24 +0000 (18:25 -0000)]
ifenslave: new applet. closes bug 115.

16 years agostart_stop_daemon: stop using data/bss
Denis Vlasenko [Tue, 26 Feb 2008 16:08:02 +0000 (16:08 -0000)]
start_stop_daemon: stop using data/bss

function                                             old     new   delta
start_stop_daemon_main                               749     770     +21
do_procinit                                          184     185      +1
quiet                                                  1       -      -1
userspec                                               4       -      -4
user_id                                                4       -      -4
signal_nr                                              4       -      -4
pidfile                                                4       -      -4
found                                                  4       -      -4
execname                                               4       -      -4
cmdname                                                4       -      -4
------------------------------------------------------------------------------
(add/remove: 0/8 grow/shrink: 2/0 up/down: 22/-29)             Total: -7 bytes

16 years agoreset: call "stty sane". Closes bug 1414.
Denis Vlasenko [Tue, 26 Feb 2008 15:33:10 +0000 (15:33 -0000)]
reset: call "stty sane". Closes bug 1414.

reset_main                                            26      59     +33
static.args                                            -      12     +12

16 years agoactually add libbb/safe_gethostname.c
Denis Vlasenko [Mon, 25 Feb 2008 23:24:32 +0000 (23:24 -0000)]
actually add libbb/safe_gethostname.c

16 years ago*: intrduce and use safe_gethostname. By Tito <farmatito AT tiscali.it>
Denis Vlasenko [Mon, 25 Feb 2008 23:23:58 +0000 (23:23 -0000)]
*: intrduce and use safe_gethostname. By Tito <farmatito AT tiscali.it>

safe_gethostname                                       -      48     +48
glob3                                                 35      37      +2
timestamp_and_log                                    314     315      +1
udhcp_send_kernel_packet                             234     231      -3
scan_tree                                            275     271      -4
passwd_main                                         1074    1070      -4
print_login_prompt                                    68      58     -10
obscure                                              392     377     -15
syslogd_main                                         882     866     -16
print_login_issue                                    516     478     -38
hostname_main                                        278     223     -55
parse_and_put_prompt                                 825     756     -69
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/9 up/down: 51/-214)          Total: -163 bytes
   text    data     bss     dec     hex filename
 798791     728    7484  807003   c505b busybox_old
 798631     728    7484  806843   c4fbb busybox_unstripped

16 years agolpd: spool mode added by Vladimir
Denis Vlasenko [Mon, 25 Feb 2008 20:30:24 +0000 (20:30 -0000)]
lpd: spool mode added by Vladimir
lpr: more robust error reporting
*: introduce and use xchroot
libbb: full_read/write now will report partial data counts prior to error
isdirectory.c: style fixes

lpd_main                                             249     486    +237
xchroot                                                -      29     +29
get_response_or_say_and_die                          110     139     +29
full_write                                            52      60      +8
full_read                                             55      63      +8
static.newline                                         1       -      -1
switch_root_main                                     404     400      -4
chpst_main                                          1089    1079     -10
getopt32                                            1370    1359     -11
chroot_main                                          115     101     -14
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 4/4 up/down: 311/-40)           Total: 271 bytes
   text    data     bss     dec     hex filename
 798472     728    7484  806684   c4f1c busybox_old
 798775     728    7484  806987   c504b busybox_unstripped

16 years agolpd: now with "svn add"...
Denis Vlasenko [Mon, 25 Feb 2008 14:48:15 +0000 (14:48 -0000)]
lpd: now with "svn add"...

16 years agolpd: new applet by Vladimir Dronnikov <dronnikov AT gmail.com>
Denis Vlasenko [Sun, 24 Feb 2008 23:32:36 +0000 (23:32 -0000)]
lpd: new applet by Vladimir Dronnikov <dronnikov AT gmail.com>

16 years agoforgotten bit of rmdir long options support
Denis Vlasenko [Sun, 24 Feb 2008 22:45:04 +0000 (22:45 -0000)]
forgotten bit of rmdir long options support

16 years agofix typo in comment, no code changes
Denis Vlasenko [Sun, 24 Feb 2008 22:08:57 +0000 (22:08 -0000)]
fix typo in comment, no code changes

16 years agolpr: fixing vda's thinko
Denis Vlasenko [Sun, 24 Feb 2008 19:22:25 +0000 (19:22 -0000)]
lpr: fixing vda's thinko

16 years agoless: shrink
Denis Vlasenko [Sun, 24 Feb 2008 19:18:18 +0000 (19:18 -0000)]
less: shrink

16 years agolpr,lpq: rework by dronnikov AT gmail.com
Denis Vlasenko [Sun, 24 Feb 2008 18:44:20 +0000 (18:44 -0000)]
lpr,lpq: rework by dronnikov AT gmail.com

16 years agormdir: optional long options support for Debian users. +68 bytes.
Denis Vlasenko [Sun, 24 Feb 2008 14:56:10 +0000 (14:56 -0000)]
rmdir: optional long options support for Debian users. +68 bytes.
By Roberto Gordo Saez <roberto.gordo AT gmail.com>

16 years agowatch: shrink (by walter harms <WHarms AT bfs.de>)
Denis Vlasenko [Sun, 24 Feb 2008 14:33:17 +0000 (14:33 -0000)]
watch: shrink (by walter harms <WHarms AT bfs.de>)

watch_main                                           327     263     -64

16 years agoless,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
Denis Vlasenko [Sun, 24 Feb 2008 13:36:01 +0000 (13:36 -0000)]
less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
*: minor shrink

16 years agoless: small shrink
Denis Vlasenko [Sat, 23 Feb 2008 12:22:17 +0000 (12:22 -0000)]
less: small shrink

16 years agosyslogd: small shrink
Denis Vlasenko [Sat, 23 Feb 2008 12:08:36 +0000 (12:08 -0000)]
syslogd: small shrink

16 years agoless: make it a bit more resistant against statusline corruption.
Denis Vlasenko [Sat, 23 Feb 2008 11:54:37 +0000 (11:54 -0000)]
less: make it a bit more resistant against statusline corruption.
less: "examine" command will not bomb out on bad file name now

less_main                                           1663    1694     +31
examine_file                                          87     114     +27
less_getch                                           138     160     +22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 80/0)               Total: 80 bytes
   text    data     bss     dec     hex filename
 798368     740    7484  806592   c4ec0 busybox_old
 798470     740    7484  806694   c4f26 busybox_unstripped

16 years agoless: update line input so that it doesn't interfere with
Denis Vlasenko [Sat, 23 Feb 2008 01:25:38 +0000 (01:25 -0000)]
less: update line input so that it doesn't interfere with
screen update. Makes "man bash", [enter], [/],
<enter search pattern>, [enter] more usable - manpage
draws as you enter the pattern! Yay!!
less: fix bug where backspace wasn't actually deleting chars
less: "examine file with empty name" doesn't abort anymore.
libbb: add "all fatal signals" mask.

getch_nowait                                           -     207    +207
status_print                                           -     105    +105
examine_file                                          64      87     +23
move_cursor                                            -      16     +16
m_status_print                                       185     195     +10
less_main                                           1656    1663      +7
decode_format_string                                 790     795      +5
test_main                                            403     405      +2
process0_stdin                                       247     249      +2
passwd_main                                         1070    1072      +2
less_gets                                            196     178     -18
buffer_print                                         169      71     -98
less_getch                                           362     138    -224
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/3 up/down: 379/-340)           Total: 39 bytes
   text    data     bss     dec     hex filename
 798329     740    7484  806553   c4e99 busybox_old
 798368     740    7484  806592   c4ec0 busybox_unstripped

16 years agolpr: document options better
Denis Vlasenko [Fri, 22 Feb 2008 23:21:31 +0000 (23:21 -0000)]
lpr: document options better

16 years agosmall code readability and typo fixes
Denis Vlasenko [Fri, 22 Feb 2008 22:43:22 +0000 (22:43 -0000)]
small code readability and typo fixes

16 years agolpr and lpq applets by Walter Harms.
Denis Vlasenko [Fri, 22 Feb 2008 22:24:48 +0000 (22:24 -0000)]
lpr and lpq applets by Walter Harms.

   text    data     bss     dec     hex filename
    392       0       0     392     188 lpq.o
   1378       0       0    1378     562 lpr.o
    142       0       0     142      8e parse_prt.o

16 years agoash: s/ckzmalloc/ckzalloc/
Denis Vlasenko [Thu, 21 Feb 2008 04:35:14 +0000 (04:35 -0000)]
ash: s/ckzmalloc/ckzalloc/

16 years agoash: sprinkle a bit more of zeroed allocations.
Denis Vlasenko [Thu, 21 Feb 2008 04:32:08 +0000 (04:32 -0000)]
ash: sprinkle a bit more of zeroed allocations.

16 years agohttpd: "HEAD" support. Closes bug 1530.
Denis Vlasenko [Thu, 21 Feb 2008 00:12:07 +0000 (00:12 -0000)]
httpd: "HEAD" support. Closes bug 1530.

send_file_and_exit                                   629     645     +16
static.request_HEAD                                    -       5      +5
handle_incoming_and_exit                            2732    2737      +5
send_headers                                         594     597      +3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 29/0)               Total: 29 bytes
   text    data     bss     dec     hex filename
 796283     740    7484  804507   c469b busybox_old
 796312     740    7484  804536   c46b8 busybox_unstripped

16 years agocorrected English in comment
Denis Vlasenko [Wed, 20 Feb 2008 22:57:24 +0000 (22:57 -0000)]
corrected English in comment

16 years agoudhcp: we were forgetting to set right op byte in tha packet
Denis Vlasenko [Wed, 20 Feb 2008 22:33:38 +0000 (22:33 -0000)]
udhcp: we were forgetting to set right op byte in tha packet
for DHCPDECLINE. Fixing, and making code smaller.

16 years agoudhcp: make paths configurable
Denis Vlasenko [Wed, 20 Feb 2008 22:29:52 +0000 (22:29 -0000)]
udhcp: make paths configurable
syslogd: trivial build fix

16 years agolibbb: introduce and use nonblock_safe_read(). Yay!
Denis Vlasenko [Wed, 20 Feb 2008 22:23:24 +0000 (22:23 -0000)]
libbb: introduce and use nonblock_safe_read(). Yay!
Our shells are immune from this nasty O_NONBLOCK now!

function                                             old     new   delta
nonblock_safe_read                                     -      78     +78
file_get                                             276     295     +19
generateMTFValues                                    428     435      +7
read_line_input                                     1776    1772      -4
preadbuffer                                          543     450     -93
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 104/-97)             Total: 7 bytes
   text    data     bss     dec     hex filename
 615190     715   23924  639829   9c355 busybox_old
 615168     715   23924  639807   9c33f busybox_unstripped

16 years ago[#1334] exec script for devices even if they dont have device nodes
Mike Frysinger [Wed, 20 Feb 2008 18:31:36 +0000 (18:31 -0000)]
[#1334] exec script for devices even if they dont have device nodes

16 years agoash: introduce and use stzalloc and ckzalloc.
Denis Vlasenko [Wed, 20 Feb 2008 16:38:54 +0000 (16:38 -0000)]
ash: introduce and use stzalloc and ckzalloc.

function                                             old     new   delta
stzalloc                                               -      29     +29
ckzalloc                                               -      29     +29
recordregion                                         108     102      -6
cmdlookup                                            158     152      -6
pipeline                                             188     181      -7
parseheredoc                                         135     128      -7
makename                                              42      35      -7
list                                                 355     348      -7
setvareq                                             221     212      -9
aliascmd                                             324     311     -13
pushfile                                              83      69     -14
readtoken1                                          2872    2849     -23
parse_command                                       1430    1391     -39
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/11 up/down: 58/-138)          Total: -80 bytes
   text    data     bss     dec     hex filename
 577227     706   23740  601673   92e49 busybox_old
 577147     706   23740  601593   92df9 busybox_unstripped

16 years agotrivial fixes to config system
Denis Vlasenko [Tue, 19 Feb 2008 23:42:22 +0000 (23:42 -0000)]
trivial fixes to config system

16 years agoash: fix fallout from "A=1 B=$A; echo $B" code.
Denis Vlasenko [Tue, 19 Feb 2008 23:31:05 +0000 (23:31 -0000)]
ash: fix fallout from "A=1 B=$A; echo $B" code.

16 years agomicrocom: tiny shrink, adding comments
Denis Vlasenko [Tue, 19 Feb 2008 18:26:40 +0000 (18:26 -0000)]
microcom: tiny shrink, adding comments

16 years agoinit: make it NOMMU-capable
Denis Vlasenko [Tue, 19 Feb 2008 14:13:20 +0000 (14:13 -0000)]
init: make it NOMMU-capable
httpd: trivial compile fix

16 years agoinit: fix comments
Denis Vlasenko [Tue, 19 Feb 2008 12:10:18 +0000 (12:10 -0000)]
init: fix comments

16 years agoinit: HUP should not be temporarily set to "restart",
Denis Vlasenko [Tue, 19 Feb 2008 12:08:38 +0000 (12:08 -0000)]
init: HUP should not be temporarily set to "restart",
we use it for config reload, and we have QUIT for "restart".

16 years agofix chat CONFIG_xxx dependencies
Denis Vlasenko [Tue, 19 Feb 2008 11:36:22 +0000 (11:36 -0000)]
fix chat CONFIG_xxx dependencies

16 years agochat: now with "svn add"
Denis Vlasenko [Tue, 19 Feb 2008 11:35:08 +0000 (11:35 -0000)]
chat: now with "svn add"

16 years agofindfs,mount: trivial build fix and whitespace fiexs
Denis Vlasenko [Tue, 19 Feb 2008 11:29:46 +0000 (11:29 -0000)]
findfs,mount: trivial build fix and whitespace fiexs

16 years agotar: optional autodetection of gz/bz2 compressed tarballs.
Denis Vlasenko [Tue, 19 Feb 2008 11:26:28 +0000 (11:26 -0000)]
tar: optional autodetection of gz/bz2 compressed tarballs.
+130 bytes. Closes bug 992.

16 years agoinit: fix bug 1111: restart actions were not splitting words:
Denis Vlasenko [Tue, 19 Feb 2008 02:57:07 +0000 (02:57 -0000)]
init: fix bug 1111: restart actions were not splitting words:

::restart:/sbin/rc restart
resulted in:
exec of '/sbin/rc restart' failed: No such file or directory

16 years agosyslogd: tighten up hostname handling.
Denis Vlasenko [Tue, 19 Feb 2008 01:10:20 +0000 (01:10 -0000)]
syslogd: tighten up hostname handling.

16 years agotail: fix "tail -c 20 /dev/huge_disk" (was taking ages)
Denis Vlasenko [Tue, 19 Feb 2008 00:38:10 +0000 (00:38 -0000)]
tail: fix "tail -c 20 /dev/huge_disk" (was taking ages)
tail: a few variables renamed
wc: tiny optimization.

16 years agochat: new applet by dronnikov AT gmail.com. With all options on:
Denis Vlasenko [Mon, 18 Feb 2008 23:24:46 +0000 (23:24 -0000)]
chat: new applet by dronnikov AT gmail.com. With all options on:

function                                             old     new   delta
chat_main                                              -    1230   +1230
unescape                                               -     135    +135
packed_usage                                       23802   23922    +120
signal_handler                                       123     131      +8
input_backward                                       123     128      +5
applet_names                                        1775    1780      +5
applet_main                                         1076    1080      +4
applet_nameofs                                       538     540      +2
exitcode                                               -       1      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 1510/0)           Total: 1510 bytes

16 years agolineedit: tiny shrink
Denis Vlasenko [Mon, 18 Feb 2008 22:28:03 +0000 (22:28 -0000)]
lineedit: tiny shrink

16 years agosupport for mount by label (not yet tested)
Denis Vlasenko [Mon, 18 Feb 2008 21:08:49 +0000 (21:08 -0000)]
support for mount by label (not yet tested)
Also adds findfs applet. Closes bug 1143.

16 years ago- fix open(creat) without a mode
Bernhard Reutner-Fischer [Mon, 18 Feb 2008 18:35:53 +0000 (18:35 -0000)]
- fix open(creat) without a mode

16 years agomount: with -vv -f, say what mount() calls we were going to make
Denis Vlasenko [Mon, 18 Feb 2008 13:05:38 +0000 (13:05 -0000)]
mount: with -vv -f, say what mount() calls we were going to make

 782357     728    7476  790561   c1021 busybox_old
 782429     728    7476  790633   c1069 busybox_unstripped

16 years agomount: optional support for -vv verbosity
Denis Vlasenko [Mon, 18 Feb 2008 12:07:49 +0000 (12:07 -0000)]
mount: optional support for -vv verbosity
mount: do "struct globals" trick

With -vv on:

function                                             old     new   delta
verbose_mount                                          -      83     +83
mount_main                                           970     988     +18
mount_it_now                                         219     229     +10
singlemount                                         4564    4570      +6
mount_option_str                                     227     233      +6
nfs_mount_version                                      1       -      -1
fslist                                                 4       -      -4
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 4/0 up/down: 123/-5)            Total: 118 bytes

16 years agomount: recognize "dirsync" (closes bug 835)
Denis Vlasenko [Mon, 18 Feb 2008 11:08:33 +0000 (11:08 -0000)]
mount: recognize "dirsync" (closes bug 835)
mount: sanitize environ if called by non-root
*: adjust for slightly different sanitize routine