Commit Graph

1543 Commits

Author SHA1 Message Date
Denys Vlasenko
8ee2adab21 echo: do not retry on write errors
function                                             old     new   delta
echo_main                                            297     336     +39
stpcpy                                                 -      22     +22
run_pipe                                            1561    1566      +5
pseudo_exec_argv                                     187     192      +5
hush_exit                                             75      80      +5
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0)               Total: 76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-07 02:03:51 +01:00
Lauri Kasanen
55ae0e9238 df,find_mount_point: optionally don't ignore rootfs
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-31 06:27:35 +01:00
Denys Vlasenko
df7b6577c6 id: fix inverted if (!ENABLE_DESKTOP)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 16:11:19 +01:00
Denys Vlasenko
e3d4c03852 stty: cosmetic fix to settings table; no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 11:58:37 +01:00
Denys Vlasenko
ea023eacad disable length applet. ${#var} and echo -n "$var" | wc -c are portable equivalents
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 01:21:20 +01:00
Denys Vlasenko
8d0e0cdadf move utmp.h include to libbb.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 23:21:46 +01:00
Denys Vlasenko
e54cfc5477 stty: enable line discipline display and change code if __linix__
function                                             old     new   delta
stty_main                                           1242    1276     +34
do_display                                           419     431     +12
display_speed                                         90      81      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 46/-9)              Total: 37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 18:30:35 +01:00
Denys Vlasenko
271c0ce379 stty: make swtch and iutf8 visible/settable
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 16:36:15 +01:00
Denys Vlasenko
1336f89d59 wc: fix swapped -c and -m
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 17:57:01 +01:00
Denys Vlasenko
b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
dc7e5c46b0 libbb unicode: comment out usused function and unused parameter
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 13:08:28 +01:00
Denys Vlasenko
92ffe0571a date,touch: treat 2-digit years better (fit them into +-50 yrs around today)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-02 20:02:09 +01:00
Alexey Soloviev
a5d3d3436b date: preserve isdst value if date is in time_t (unix time) format
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 05:21:51 +01:00
Denys Vlasenko
0cd4f3039b add missed underscore
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 00:01:59 +01:00
Denys Vlasenko
d1e46651a3 date: add a comment about _SVID_SOURCE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 23:56:47 +01:00
Denys Vlasenko
27c6c00a7c test: add examples when "%s: unknown operand" happens
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 03:43:20 +01:00
James Youngman
a4bc10cec7 ls: remove redundant constants LIST_FILENAME and LIST_SHORT
LIST_FILENAME is always true and LIST_SHORT affects nothing.

Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 01:36:16 +01:00
Denys Vlasenko
982aa263a0 ls: add support for -H
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 21:54:39 +01:00
Denys Vlasenko
407ab2a434 ls: tweak -e handling; better comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 16:29:08 +01:00
Denys Vlasenko
2f7d9e8903 ls: print a space after each column. Closes bug 2941
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 07:06:44 +01:00
Denys Vlasenko
163d864357 ls: make -F not follow symlinks of the command line
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 06:16:28 +01:00
Denys Vlasenko
d87815d5e0 ls: make -x force columnar output; remove unused parts of TRIGGER code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 05:43:44 +01:00
Denys Vlasenko
f313746a6d ls: for some options, only last takes effect. Closes bug 2959
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 05:05:34 +01:00
Denys Vlasenko
3f2477e8a8 touch: fix help text to not show options disabled in .config
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-01 13:06:03 +01:00
Denys Vlasenko
9e0f15010e date :add a comment about older toolchains
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-23 00:15:19 +01:00
Denys Vlasenko
4909fec73e ls: fix -lg to show group (was showing user)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 00:46:57 +01:00
Eric Lammerts
66be9197a5 stat: fix mtime/ctime/atime
If you set CONFIG_FEATURE_STAT_FORMAT=n, two of the three printed
times are wrong, because a global buffer is reused. Fix below.

Signed-off-by: Eric Lammerts <busybox@lists.lammerts.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30 02:48:20 +02:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +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
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
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
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
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
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
Denys Vlasenko
bec588878b *: s/open3_or_warn/open_or_warn/ where makes sense
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-20 13:21:22 +02:00
Denys Vlasenko
5fe2f863b9 sort: -o FILE should create/truncate FILE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 02:43:57 +02:00
Denys Vlasenko
c05387d5de *: 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>
2010-10-18 02:38:27 +02:00
Denys Vlasenko
ea694163af typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 12:45:24 +02:00
Denys Vlasenko
786635e62e seq: exit on write errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 12:44:39 +02:00
Denys Vlasenko
c0683acce8 *: 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>
2010-10-16 20:45:27 +02:00
Denys Vlasenko
f2710d0221 date: move applet and usage bits to date.c
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-15 10:42:17 +02:00
Denys Vlasenko
afc7b4c0d8 wc: add support for -m
function                                             old     new   delta
wc_main                                              601     637     +36
packed_usage                                       27357   27358      +1

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-04 17:08:14 +02:00
Denys Vlasenko
09e7dafbfe wc: preparatory patch, no logic changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-04 17:04:20 +02:00
Dan Fandrich
2d1a78b88f Marked some more applets NOEXEC/NOFORK
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-01 23:35:09 +02:00
Denys Vlasenko
04bcd998ca style fix. no code chages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-25 17:19:04 +02:00
Denys Vlasenko
0f2e278a8a sleep: fix fractional arguments in non-POSIX locale
function                                             old     new   delta
sleep_main                                           390     379     -11

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-24 12:39:45 +02:00
Denys Vlasenko
9fe98f701d libbb: merge mail and uudecode's base64 decoders
function                                             old     new   delta
read_base64                                            -     378    +378
uudecode_main                                        306     315      +9
parse                                                953     958      +5
read_stduu                                           250     254      +4
base64_main                                          217     219      +2
read_base64                                          358       -    -358
decode_base64                                        371       -    -371
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729)         Total: -331 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-16 17:51:13 +02:00
Denys Vlasenko
197a6b3c14 sleep: make it non-NOFORK. Fixes ^C in standalone shell
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-14 12:57:05 +02:00