Commit Graph

11926 Commits

Author SHA1 Message Date
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Alexander Shishkin
7765095441 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>
2010-10-28 06:10:03 +02:00
Alexander Shishkin
78b286fea5 login: free fromhost upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 05:49:55 +02:00
Denys Vlasenko
16cc80e989 crc32: cleanups, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 05:38:11 +02:00
Denys Vlasenko
db9ccc5772 netstat: was using buffers one byte short for scanf (no place for NUL). fixing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 02:36:17 +02:00
Denys Vlasenko
9ce642f974 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>
2010-10-27 15:26:45 +02:00
Denys Vlasenko
dd88ba88f5 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>
2010-10-27 13:10:29 +02:00
Denys Vlasenko
c386aa5dcd Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox 2010-10-27 11:24:40 +02:00
Marek Polacek
3c99d59b5d 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>
2010-10-27 02:25:16 +02:00
Bob Dunlop
55a046b4db 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>
2010-10-27 02:12:29 +02:00
Denys Vlasenko
4fa07bd8fa whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27 00:04:50 +02:00
Denys Vlasenko
4c46d85469 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>
2010-10-26 15:58:47 +02:00
Denys Vlasenko
a43e969574 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>
2010-10-26 13:03:31 +02:00
Denys Vlasenko
d8b687f992 powertop: IPIs and hw irqs were swapped, fixing
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-26 12:42:53 +02:00
Denys Vlasenko
c3f1fa10d6 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>
2010-10-26 12:39:36 +02:00
Denys Vlasenko
373789e567 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>
2010-10-26 02:54:13 +02:00
Denys Vlasenko
a2d27a1919 libbb/process_escape_sequence.c: fix recently broken handling of \\
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-25 12:14:21 +02:00
Marek Polacek
b507cc3ace powertop: new applet
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 03:44:34 +02:00
Kevin Cernekee
ccb070450e fdisk: initial stab at GPT partition support
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 02:00:24 +02:00
Denys Vlasenko
3b060528a2 init: do not sleep forever on usage errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 00:40:32 +02:00
Denys Vlasenko
03a5fe378e sha1: small tweak for clearer code, no logic changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 20:51:28 +02:00
Denys Vlasenko
f4c93ab304 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>
2010-10-24 19:27:30 +02:00
Denys Vlasenko
4b63e16d20 md5/sha1sum: code shrink
function                                             old     new   delta
hash_file                                            357     279     -78

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 14:54:53 +02:00
Denys Vlasenko
ba04337e1f umount: I forgot to change another PATH_MAX to 4096
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 13:28:45 +02:00
Denys Vlasenko
17fc33dfbd finish busybox.1 renaming
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:46:16 +02:00
Rob Landley
d8205b39ab awk: reduce ifdef forest
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:27:22 +02:00
Denys Vlasenko
738e4de013 English fixes to docs/smallint.txt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:23:59 +02:00
Denys Vlasenko
8f8ee534a7 adding docs/smallint.txt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:07:18 +02:00
Denys Vlasenko
58647e8f85 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>
2010-10-24 03:02:57 +02:00
Denys Vlasenko
07b1c6ecc0 umount: do not (ab)use PATH_MAX as mntent buffer size
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:00:57 +02:00
Denys Vlasenko
1c26e05f30 remove unused SC_x (serial port names) defines
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 02:35:17 +02:00
Denys Vlasenko
57b68331e4 correct manpage name
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 02:09:32 +02:00
Denys Vlasenko
f2657a9968 init: do not clear CRTSCTS (fix from Debian bug 528560)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 02:04:10 +02:00
Denys Vlasenko
2b299fed6a 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>
2010-10-24 01:58:04 +02:00
Denys Vlasenko
5360059131 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>
2010-10-23 21:06:06 +02:00
Denys Vlasenko
6a0d7490ea awk: fix segfault on closing non-opened file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23 21:02:15 +02:00
Alexander Shishkin
54779a47e9 mount: code shrink (-81 bytes)
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:35:47 +02:00
Alexander Shishkin
6722737ece *: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:27:16 +02:00
Alexander Shishkin
cbfeaac7af smemcap: close /proc handle upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:18:23 +02:00
Alexander Shishkin
46b6cd7630 nbd-client: kill unused variable (total 0 bytes)
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:16:53 +02:00
Denys Vlasenko
d3036ef608 pmap: get rid of a warning
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:15:15 +02:00
Denys Vlasenko
0bb35e19a7 udhcpd: reduce stack usage by ~700 bytes. +28 bytes code size
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-21 12:33:10 +02:00
Lukas Huba
08187356d7 patch: implement -E option
Signed-off-by: Lukas Huba <Huba.Lukas@centrum.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:43:00 +02:00
Denys Vlasenko
e7599d1cc7 revert last change (wrong author)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:42:15 +02:00
Gilles Espinasse
f0c7e0c8d5 patch: implement -E option
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:39:46 +02:00
Alexander Shishkin
2348e09557 tail: free tailbuf upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:25:45 +02:00
Alexander Shishkin
a7027bf89e 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>
2010-10-21 00:24:05 +02:00
Leonid Lisovskiy
894ef60032 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>
2010-10-20 22:36:51 +02:00
Denys Vlasenko
5d374e9b14 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>
2010-10-20 22:26:38 +02:00
Denys Vlasenko
c72c1d7b31 udhcpc: reduce stack usage by de-inlining routines with on-stack pkt buf
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-20 22:08:16 +02:00