oweals/busybox.git
14 years agoupdate docs/new-applet-HOWTO.txt
Holger Blasum [Thu, 28 Oct 2010 18:37:05 +0000 (20:37 +0200)]
update docs/new-applet-HOWTO.txt

Signed-off-by: Holger Blasum <hbl@sysgo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoipcrm: small code shrink
Denys Vlasenko [Thu, 28 Oct 2010 17:10:46 +0000 (19:10 +0200)]
ipcrm: small code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: whitespace fixes
Denys Vlasenko [Thu, 28 Oct 2010 16:57:19 +0000 (18:57 +0200)]
*: whitespace fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomount: pass NULL, not "", as "data" to mount syscall if we have no opts
Alexander Shishkin [Thu, 28 Oct 2010 04:10:03 +0000 (06:10 +0200)]
mount: pass NULL, not "", as "data" to mount syscall if we have no opts

When mounting a filesystem without any additional options (data parameter
to the mount(2) syscall), pass NULL instead of an empty string like GNU
mount does. This fixes, for example mounting cgroup fs with bbox mount.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agologin: free fromhost upon cleaning up
Alexander Shishkin [Wed, 27 Oct 2010 16:52:40 +0000 (19:52 +0300)]
login: free fromhost upon cleaning up

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocrc32: cleanups, no code changes
Denys Vlasenko [Thu, 28 Oct 2010 03:38:11 +0000 (05:38 +0200)]
crc32: cleanups, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonetstat: was using buffers one byte short for scanf (no place for NUL). fixing
Denys Vlasenko [Thu, 28 Oct 2010 00:36:17 +0000 (02:36 +0200)]
netstat: was using buffers one byte short for scanf (no place for NUL). fixing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: introduce and use common crc32 routine
Denys Vlasenko [Wed, 27 Oct 2010 13:26:45 +0000 (15:26 +0200)]
libbb: introduce and use common crc32 routine

function                                             old     new   delta
crc32_block_endian1                                    -      37     +37
crc32_block_endian0                                    -      34     +34
global_crc32_table                                     -       8      +8
file_read                                             82      87      +5
gzip_main                                            211     214      +3
xz_crc32                                              40      35      -5
crc32_table                                            8       -      -8
calculate_gunzip_crc                                  54      34     -20
lzo_crc32                                             54      25     -29
cksum_main                                           298     211     -87
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149)           Total: -62 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agonetstat: fix IPv6 problem (garbage in scope_id); code shrink
Denys Vlasenko [Wed, 27 Oct 2010 11:10:29 +0000 (13:10 +0200)]
netstat: fix IPv6 problem (garbage in scope_id); code shrink

function                                             old     new   delta
add_to_prg_cache_if_socket                             -     253    +253
print_inet_line                                      226     241     +15
udp_do_one                                           119     131     +12
tcp_do_one                                            65      77     +12
unix_do_one                                          530     529      -1
dir_act                                              215     207      -8
netstat_main                                         585     553     -32
.rodata                                           145592  145525     -67
file_act                                             255       -    -255
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/4 up/down: 292/-363)          Total: -71 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoMerge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
Denys Vlasenko [Wed, 27 Oct 2010 09:24:40 +0000 (11:24 +0200)]
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox

14 years agotop: Use _exit() instead of exit() in sighandler
Marek Polacek [Wed, 27 Oct 2010 00:25:16 +0000 (02:25 +0200)]
top: Use _exit() instead of exit() in sighandler

Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonetstat: fix -r display in usage text
Bob Dunlop [Wed, 27 Oct 2010 00:12:29 +0000 (02:12 +0200)]
netstat: fix -r display in usage text

Signed-off-by: Bob Dunlop <bob.dunlop@xyzzy.org.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowhitespace fix
Denys Vlasenko [Tue, 26 Oct 2010 22:04:50 +0000 (00:04 +0200)]
whitespace fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomv: implement -n option
Denys Vlasenko [Tue, 26 Oct 2010 13:58:47 +0000 (15:58 +0200)]
mv: implement -n option

function                                             old     new   delta
mv_longopts                                           23      36     +13
mv_main                                              510     520     +10
packed_usage                                       27218   27225      +7

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopowertop: simplified C-state display code
Denys Vlasenko [Tue, 26 Oct 2010 11:03:31 +0000 (13:03 +0200)]
powertop: simplified C-state display code

function                                             old     new   delta
.rodata                                           145530  145514     -16
powertop_main                                       1510    1403    -107

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopowertop: IPIs and hw irqs were swapped, fixing
Denys Vlasenko [Tue, 26 Oct 2010 10:42:53 +0000 (12:42 +0200)]
powertop: IPIs and hw irqs were swapped, fixing

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopowertop: fixes to output format and code shrink
Denys Vlasenko [Tue, 26 Oct 2010 10:39:36 +0000 (12:39 +0200)]
powertop: fixes to output format and code shrink

function                                             old     new   delta
process_timer_stats                                    -     631    +631
clear_lines                                           72      74      +2
process_irq_counts                                   729     726      -3
.rodata                                           145699  145530    -169
powertop_main                                       2341    1510    -831
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/2 up/down: 1359/-1729)       Total: -370 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopowertop: code shrink
Denys Vlasenko [Tue, 26 Oct 2010 00:54:13 +0000 (02:54 +0200)]
powertop: code shrink

function                                             old     new   delta
process_irq_count_deltas                               -     729    +729
read_cstate_counts                                     -     358    +358
save_line                                              -     150    +150
clear_lines                                           80      72      -8
line_compare                                          18       7     -11
.rodata                                           145736  145699     -37
powertop_main                                       2527    2341    -186
push_line                                            193       -    -193
read_data                                            348       -    -348
do_proc_irq                                          890       -    -890
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 0/4 up/down: 1237/-1673)       Total: -436 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb/process_escape_sequence.c: fix recently broken handling of \\
Denys Vlasenko [Mon, 25 Oct 2010 10:14:21 +0000 (12:14 +0200)]
libbb/process_escape_sequence.c: fix recently broken handling of \\

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopowertop: new applet
Marek Polacek [Mon, 25 Oct 2010 01:44:34 +0000 (03:44 +0200)]
powertop: new applet

Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofdisk: initial stab at GPT partition support
Kevin Cernekee [Mon, 25 Oct 2010 00:00:24 +0000 (02:00 +0200)]
fdisk: initial stab at GPT partition support

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoinit: do not sleep forever on usage errors
Denys Vlasenko [Sun, 24 Oct 2010 22:40:32 +0000 (00:40 +0200)]
init: do not sleep forever on usage errors

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosha1: small tweak for clearer code, no logic changes
Denys Vlasenko [Sun, 24 Oct 2010 18:51:28 +0000 (20:51 +0200)]
sha1: small tweak for clearer code, no logic changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosha1: use Rob's code, it's smaller and faster
Denys Vlasenko [Sun, 24 Oct 2010 17:27:30 +0000 (19:27 +0200)]
sha1: use Rob's code, it's smaller and faster

function                                             old     new   delta
static.rconsts                                         -      16     +16
sha1_process_block64                                 460     298    -162
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 16/-162)          Total: -146 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5/sha1sum: code shrink
Denys Vlasenko [Sun, 24 Oct 2010 12:54:53 +0000 (14:54 +0200)]
md5/sha1sum: code shrink

function                                             old     new   delta
hash_file                                            357     279     -78

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoumount: I forgot to change another PATH_MAX to 4096
Denys Vlasenko [Sun, 24 Oct 2010 11:28:45 +0000 (13:28 +0200)]
umount: I forgot to change another PATH_MAX to 4096

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofinish busybox.1 renaming
Denys Vlasenko [Sun, 24 Oct 2010 01:46:16 +0000 (03:46 +0200)]
finish busybox.1 renaming

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoawk: reduce ifdef forest
Rob Landley [Sun, 24 Oct 2010 01:27:22 +0000 (03:27 +0200)]
awk: reduce ifdef forest

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoEnglish fixes to docs/smallint.txt
Denys Vlasenko [Sun, 24 Oct 2010 01:23:59 +0000 (03:23 +0200)]
English fixes to docs/smallint.txt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoadding docs/smallint.txt
Denys Vlasenko [Sun, 24 Oct 2010 01:07:18 +0000 (03:07 +0200)]
adding docs/smallint.txt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoRemove check for supported libc.
Denys Vlasenko [Sun, 24 Oct 2010 01:02:57 +0000 (03:02 +0200)]
Remove check for supported libc.

If it is not supported, it won't work. No need to break working ones
which happen to this over this check.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoumount: do not (ab)use PATH_MAX as mntent buffer size
Denys Vlasenko [Sun, 24 Oct 2010 01:00:57 +0000 (03:00 +0200)]
umount: do not (ab)use PATH_MAX as mntent buffer size

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoremove unused SC_x (serial port names) defines
Denys Vlasenko [Sun, 24 Oct 2010 00:35:17 +0000 (02:35 +0200)]
remove unused SC_x (serial port names) defines

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocorrect manpage name
Denys Vlasenko [Sun, 24 Oct 2010 00:09:32 +0000 (02:09 +0200)]
correct manpage name

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoinit: do not clear CRTSCTS (fix from Debian bug 528560)
Denys Vlasenko [Sun, 24 Oct 2010 00:04:10 +0000 (02:04 +0200)]
init: do not clear CRTSCTS (fix from Debian bug 528560)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoawk: fix breakage in last commit
Denys Vlasenko [Sat, 23 Oct 2010 23:58:04 +0000 (01:58 +0200)]
awk: fix breakage in last commit

While at it, made bb_process_escape_sequence faster (same size)

function                                             old     new   delta
nextchar                                              49      53      +4
bb_process_escape_sequence                           138     140      +2
next_token                                           838     839      +1
static.charmap                                        20      18      -2
is_assignment                                        143     135      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 7/-10)              Total: -3 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: introduce and use strcpy_and_process_escape_sequences
Denys Vlasenko [Sat, 23 Oct 2010 19:06:06 +0000 (21:06 +0200)]
libbb: introduce and use strcpy_and_process_escape_sequences

function                                             old     new   delta
strcpy_and_process_escape_sequences                    -      50     +50
bb_process_escape_sequence                           148     138     -10
printf_main                                          789     776     -13
getty_main                                          1897    1831     -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoawk: fix segfault on closing non-opened file
Denys Vlasenko [Sat, 23 Oct 2010 19:02:15 +0000 (21:02 +0200)]
awk: fix segfault on closing non-opened file

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomount: code shrink (-81 bytes)
Alexander Shishkin [Fri, 22 Oct 2010 11:35:47 +0000 (13:35 +0200)]
mount: code shrink (-81 bytes)

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years ago*: introduce and use xmkstemp. -65 bytes.
Alexander Shishkin [Fri, 22 Oct 2010 11:27:16 +0000 (13:27 +0200)]
*: introduce and use xmkstemp. -65 bytes.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agosmemcap: close /proc handle upon cleaning up
Alexander Shishkin [Thu, 21 Oct 2010 20:44:47 +0000 (23:44 +0300)]
smemcap: close /proc handle upon cleaning up

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agonbd-client: kill unused variable (total 0 bytes)
Alexander Shishkin [Thu, 21 Oct 2010 10:32:27 +0000 (13:32 +0300)]
nbd-client: kill unused variable (total 0 bytes)

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopmap: get rid of a warning
Denys Vlasenko [Fri, 22 Oct 2010 11:15:15 +0000 (13:15 +0200)]
pmap: get rid of a warning

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoudhcpd: reduce stack usage by ~700 bytes. +28 bytes code size
Denys Vlasenko [Thu, 21 Oct 2010 10:33:10 +0000 (12:33 +0200)]
udhcpd: reduce stack usage by ~700 bytes. +28 bytes code size

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopatch: implement -E option
Lukas Huba [Wed, 20 Oct 2010 22:43:00 +0000 (00:43 +0200)]
patch: implement -E option

Signed-off-by: Lukas Huba <Huba.Lukas@centrum.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorevert last change (wrong author)
Denys Vlasenko [Wed, 20 Oct 2010 22:42:15 +0000 (00:42 +0200)]
revert last change (wrong author)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: implement -E option
Gilles Espinasse [Wed, 20 Oct 2010 22:39:46 +0000 (00:39 +0200)]
patch: implement -E option

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotail: free tailbuf upon cleaning up
Alexander Shishkin [Wed, 20 Oct 2010 22:25:45 +0000 (00:25 +0200)]
tail: free tailbuf upon cleaning up

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agostat: remove superfluous setXXent() calls, plug memory leak
Alexander Shishkin [Wed, 20 Oct 2010 22:24:05 +0000 (00:24 +0200)]
stat: remove superfluous setXXent() calls, plug memory leak

function                                             old     new   delta
print_stat                                           875     865     -10

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agontpd: fix usage text and a typo in constant name
Leonid Lisovskiy [Wed, 20 Oct 2010 20:36:51 +0000 (22:36 +0200)]
ntpd: fix usage text and a typo in constant name

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: exit if iface disappeared; use correct MAC if it changes
Denys Vlasenko [Wed, 20 Oct 2010 20:26:38 +0000 (22:26 +0200)]
udhcpc: exit if iface disappeared; use correct MAC if it changes

function                                             old     new   delta
udhcpc_main                                         2560    2618     +58

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: reduce stack usage by de-inlining routines with on-stack pkt buf
Denys Vlasenko [Wed, 20 Oct 2010 20:08:16 +0000 (22:08 +0200)]
udhcpc: reduce stack usage by de-inlining routines with on-stack pkt buf

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: periodically reread our ifindex and mac
Denys Vlasenko [Wed, 20 Oct 2010 19:38:29 +0000 (21:38 +0200)]
udhcpc: periodically reread our ifindex and mac

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: emit maxsize option in all non-NAK type packets
Denys Vlasenko [Wed, 20 Oct 2010 19:37:23 +0000 (21:37 +0200)]
udhcpc: emit maxsize option in all non-NAK type packets

Before, we were sending them only in DISCOVER packets.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodhcp: typo fix: UPD_DHCP_SIZE -> UDP_DHCP_SIZE
Denys Vlasenko [Wed, 20 Oct 2010 16:04:36 +0000 (18:04 +0200)]
dhcp: typo fix: UPD_DHCP_SIZE -> UDP_DHCP_SIZE

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoudhcpc: better help text
Denys Vlasenko [Wed, 20 Oct 2010 14:10:59 +0000 (16:10 +0200)]
udhcpc: better help text

function                                             old     new   delta
packed_usage                                       27452   27486     +34

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoadd/remove-shell: use O_TRUNC instead of O_EXCL
Denys Vlasenko [Wed, 20 Oct 2010 13:14:32 +0000 (15:14 +0200)]
add/remove-shell: use O_TRUNC instead of O_EXCL

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoadd-shell, remove-shell: new applets
Alexander Shishkin [Wed, 20 Oct 2010 11:22:24 +0000 (13:22 +0200)]
add-shell, remove-shell: new applets

function                                             old     new   delta
add_remove_shell_main                                  -     259    +259
packed_usage                                       27408   27438     +30
applet_names                                        2326    2349     +23
applet_main                                         1364    1372      +8
applet_nameofs                                       682     686      +4
run_applet_and_exit                                  700     703      +3
dont_add                                               -       2      +2
applet_install_loc                                   171     172      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 330/0)             Total: 330 bytes

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years ago*: s/open3_or_warn/open_or_warn/ where makes sense
Denys Vlasenko [Wed, 20 Oct 2010 11:21:22 +0000 (13:21 +0200)]
*: s/open3_or_warn/open_or_warn/ where makes sense

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoudhcpc: remove now-unneeded definitions of vendor and client-id opts
Denys Vlasenko [Wed, 20 Oct 2010 00:03:30 +0000 (02:03 +0200)]
udhcpc: remove now-unneeded definitions of vendor and client-id opts

function                                             old     new   delta
dhcp_optflags                                         68      64      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: remove -c CLIENTID, it is hard to use, -x 61:hexstring does the same better
Denys Vlasenko [Tue, 19 Oct 2010 23:42:37 +0000 (01:42 +0200)]
udhcpc: remove -c CLIENTID, it is hard to use, -x 61:hexstring does the same better

function                                             old     new   delta
packed_usage                                       27802   27808      +6
static.udhcpc_longopts                               261     250     -11
udhcpc_main                                         2799    2780     -19
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 6/-30)             Total: -24 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: move usage text to .c file. no code changes
Denys Vlasenko [Tue, 19 Oct 2010 23:38:56 +0000 (01:38 +0200)]
udhcpc: move usage text to .c file. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodmesg: more correct skipping of <N>; use faster putchar for most output
Denys Vlasenko [Tue, 19 Oct 2010 21:08:33 +0000 (23:08 +0200)]
dmesg: more correct skipping of <N>; use faster putchar for most output

function                                             old     new   delta
dmesg_main                                           246     291     +45

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoklogd: do not log partial lines
Denys Vlasenko [Tue, 19 Oct 2010 21:07:49 +0000 (23:07 +0200)]
klogd: do not log partial lines

function                                             old     new   delta
overlapping_strcpy                                    15      18      +3
klogd_main                                           438     436      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomkmakefile: make 3.82 fix
Thomas Chou [Tue, 19 Oct 2010 07:17:12 +0000 (15:17 +0800)]
mkmakefile: make 3.82 fix

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agomd5: remove outdated comment
Denys Vlasenko [Tue, 19 Oct 2010 00:33:39 +0000 (02:33 +0200)]
md5: remove outdated comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb/hash_md5_sha: use common ctx and code for md5 and sha1/256
Denys Vlasenko [Tue, 19 Oct 2010 00:16:12 +0000 (02:16 +0200)]
libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256

function                                             old     new   delta
sha256_process_block64                               421     433     +12
md5_crypt                                            578     587      +9
md5_begin                                             43      50      +7
md5_hash                                              99      97      -2
sha1_end                                              85      82      -3
md5_end                                               36      31      -5
common64_end                                          93      86      -7
sha1_hash                                             97       -     -97

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonanddump: make oobbuf allocation dynamic
Baruch Siach [Mon, 18 Oct 2010 09:35:30 +0000 (11:35 +0200)]
nanddump: make oobbuf allocation dynamic

In accordance with upstream mtd-utils commit 96a5eeaf (mtd-utils: nanddump:
Dynamic buffer, increase pagesize/oobsize).

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agohash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytes
Denys Vlasenko [Mon, 18 Oct 2010 12:48:30 +0000 (14:48 +0200)]
hash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb/hash_sha.c -> libbb/hash_md5_sha.c
Denys Vlasenko [Mon, 18 Oct 2010 11:47:47 +0000 (13:47 +0200)]
libbb/hash_sha.c -> libbb/hash_md5_sha.c

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb: move md5 and shaN into a common source file. no code changes
Denys Vlasenko [Mon, 18 Oct 2010 11:46:07 +0000 (13:46 +0200)]
libbb: move md5 and shaN into a common source file. no code changes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agomd5: length should be stored in *little-endian* order! fixing...
Denys Vlasenko [Mon, 18 Oct 2010 09:50:17 +0000 (11:50 +0200)]
md5: length should be stored in *little-endian* order! fixing...

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years ago*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits
Denys Vlasenko [Mon, 18 Oct 2010 09:40:26 +0000 (11:40 +0200)]
*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years ago*: use SWAP_BE64 instead of open-coding it
Denys Vlasenko [Mon, 18 Oct 2010 09:39:47 +0000 (11:39 +0200)]
*: use SWAP_BE64 instead of open-coding it

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb: rename hash source files. no code changes
Denys Vlasenko [Mon, 18 Oct 2010 08:38:18 +0000 (10:38 +0200)]
libbb: rename hash source files. no code changes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agosort: -o FILE should create/truncate FILE
Denys Vlasenko [Mon, 18 Oct 2010 00:43:57 +0000 (02:43 +0200)]
sort: -o FILE should create/truncate FILE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: replace xopen3 with xopen where makes sense
Denys Vlasenko [Mon, 18 Oct 2010 00:38:27 +0000 (02:38 +0200)]
*: replace xopen3 with xopen where makes sense

function                                             old     new   delta
uniq_main                                            421     416      -5
sort_main                                            803     798      -5
patch_main                                          2051    2046      -5
cpio_main                                            547     542      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonanddump: new applet
Baruch Siach [Mon, 18 Oct 2010 00:36:34 +0000 (02:36 +0200)]
nanddump: new applet

function                                             old     new   delta
nandwrite_main                                       418     936    +518
dump_bad                                               -     119    +119
packed_usage                                       27752   27810     +58
next_good_eraseblock                                  84     106     +22
applet_names                                        2366    2375      +9
applet_main                                         1380    1384      +4
applet_nameofs                                       690     692      +2
bbconfig_config_bz2                                 4932    4922     -10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 6/1 up/down: 732/-10)           Total: 722 bytes

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocpio: avoid 'not created: newer or same age file exists' message for dirs
Pascal Bellard [Sun, 17 Oct 2010 22:54:51 +0000 (00:54 +0200)]
cpio: avoid 'not created: newer or same age file exists' message for dirs

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodepmod: accept and ignore -u, -q, -C FILE
Pascal Bellard [Sun, 17 Oct 2010 22:51:16 +0000 (00:51 +0200)]
depmod: accept and ignore -u, -q, -C FILE

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotouch: update help text
Pascal Bellard [Sun, 17 Oct 2010 22:43:07 +0000 (00:43 +0200)]
touch: update help text

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5: fix biuld failure on big-endian machines
Denys Vlasenko [Sun, 17 Oct 2010 21:01:32 +0000 (23:01 +0200)]
md5: fix biuld failure on big-endian machines

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodocs: Sync up AUTHORS and busybox_footer.pod
Kevin Cernekee [Sun, 10 Oct 2010 20:15:57 +0000 (13:15 -0700)]
docs: Sync up AUTHORS and busybox_footer.pod

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodocs: Change CVS references to Git
Kevin Cernekee [Sun, 10 Oct 2010 20:09:31 +0000 (13:09 -0700)]
docs: Change CVS references to Git

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotypo fix
Denys Vlasenko [Sun, 17 Oct 2010 10:45:24 +0000 (12:45 +0200)]
typo fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoseq: exit on write errors
Denys Vlasenko [Sun, 17 Oct 2010 10:44:39 +0000 (12:44 +0200)]
seq: exit on write errors

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: fix OPTION_IP_PAIR parsing
Vladislav Grishenko [Sun, 17 Oct 2010 10:27:50 +0000 (12:27 +0200)]
udhcpc: fix OPTION_IP_PAIR parsing

http://git.busybox.net/busybox/commit/?id=7d3a48a003cd645edfae2b404493688022
revealed incorrect OPTION_IP_PAIR implementation, which doesn't respect
option length and causes erroneous classful routes, composed from garbage
or first bytes from the next DHCP packet option.

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5: code shrink -5 bytes
Denys Vlasenko [Sun, 17 Oct 2010 09:38:44 +0000 (11:38 +0200)]
md5: code shrink -5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobring md5 and sha1 names closer. no code changes
Denys Vlasenko [Sun, 17 Oct 2010 01:21:51 +0000 (03:21 +0200)]
bring md5 and sha1 names closer. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5: code shrink
Denys Vlasenko [Sun, 17 Oct 2010 01:00:36 +0000 (03:00 +0200)]
md5: code shrink

function                                             old     new   delta
md5_end                                              125     104     -21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoshaN: code shrink
Denys Vlasenko [Sat, 16 Oct 2010 23:35:16 +0000 (01:35 +0200)]
shaN: code shrink

function                                             old     new   delta
init512_lo                                            32      40      +8
init256                                               32      40      +8
sha256_begin                                          42      28     -14
sha512_begin                                          81      53     -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-42)            Total: -26 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowhitespace fix
Denys Vlasenko [Sat, 16 Oct 2010 21:39:43 +0000 (23:39 +0200)]
whitespace fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosha512: inline rotr64
Denys Vlasenko [Sat, 16 Oct 2010 21:31:15 +0000 (23:31 +0200)]
sha512: inline rotr64

function                                             old     new   delta
sha1_process_block64                                 461     446     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoshaN: small code shrink
Denys Vlasenko [Sat, 16 Oct 2010 20:43:34 +0000 (22:43 +0200)]
shaN: small code shrink

function                                             old     new   delta
sha512_hash                                          134     128      -6
sha1_hash                                            114     106      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5: fix "fast" md5 broken by prev commit
Denys Vlasenko [Sat, 16 Oct 2010 19:34:36 +0000 (21:34 +0200)]
md5: fix "fast" md5 broken by prev commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotestsuite: add tests for {ms5,shaN}sum
Denys Vlasenko [Sat, 16 Oct 2010 19:26:47 +0000 (21:26 +0200)]
testsuite: add tests for {ms5,shaN}sum

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomd5: code shrink; and use 64-byte temp buf, not 128-byte.
Denys Vlasenko [Sat, 16 Oct 2010 18:46:35 +0000 (20:46 +0200)]
md5: code shrink; and use 64-byte temp buf, not 128-byte.

function                                             old     new   delta
md5_hash                                             111     108      -3
md5_end                                              129     125      -4
md5_hash_block                                       459     454      -5
filter_rename_config                                 250     244      -6
md5_crypt                                            587     578      -9
popmaildir_main                                      828     816     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39)             Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: pass md5/shaN context pointer as 1st arg, not last
Denys Vlasenko [Sat, 16 Oct 2010 18:45:27 +0000 (20:45 +0200)]
*: pass md5/shaN context pointer as 1st arg, not last

function                                             old     new   delta
md5_hash_block                                       458     459      +1
filter_rename_config                                 252     250      -2
md5_crypt                                            591     587      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomodutils/*: move help bits into corresponding .c files
Denys Vlasenko [Fri, 15 Oct 2010 23:56:41 +0000 (01:56 +0200)]
modutils/*: move help bits into corresponding .c files

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb/md5: code shrink
Denys Vlasenko [Fri, 15 Oct 2010 23:08:32 +0000 (01:08 +0200)]
libbb/md5: code shrink

function                                             old     new   delta
md5_end                                              123     117      -6
md5_begin                                             49      42      -7
md5_hash                                             119     104     -15

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>