Commit Graph

1522 Commits

Author SHA1 Message Date
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
Dan Fandrich
77d4872691 Avoid side effects in putc(), which may be implemented as a macro
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09 11:48:02 +02:00
Denys Vlasenko
6f80fe71f0 uudecode,base64: code shrink
function                                             old     new   delta
read_base64                                          373     358     -15

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01 13:24:05 +02:00
Denys Vlasenko
ee06264a29 base64: new applet
function                                             old     new   delta
base64_main                                            -     217    +217
packed_usage                                       27181   27229     +48
read_base64                                          348     373     +25
applet_names                                        2299    2306      +7
bbconfig_config_bz2                                 4942    4948      +6
applet_main                                         1352    1356      +4
applet_nameofs                                       676     678      +2
applet_install_loc                                   169     170      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/0 up/down: 310/0)             Total: 310 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-31 14:09:22 +02:00
Denys Vlasenko
b32a543663 nandwrite: complain on malformed -s NUM
Elsewhere: use common error message. -30 bytes net size change

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 13:29:02 +02:00
Denys Vlasenko
7ff6836db3 split: use xopen_stdin()
function                                             old     new   delta
split_main                                           558     543     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-23 03:06:46 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
9768a82eb0 *: fix "see file License ..." - the file is named LICENSE (in uppercase)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:04:14 +02:00
Denys Vlasenko
7783248eaa *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12 14:14:45 +02:00
Jeremie Koenig
138ce54c9c stty: sort out preprocessor conditionals
* Move the definitions of missing constants to the top of the file.
* Fix undefined IDX_xxx on missing termios constants.
* FreeBSD has TABDLY, TAB0 and TAB3, but no TAB1 or TAB2
* Omit the definition of set_window_size() if TIOCGWINSZ is not available.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01 03:31:35 +02:00
Denys Vlasenko
f3ea792bad *: mass cosmetic removal of extra empty lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Jeremie Koenig
1d7266d3b5 mark Linux-specific configuration options
PLATFORM_LINUX is used as a dependency for applets or features
which require Linux-specific interfaces.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:44:56 +02:00
Jeremie Koenig
b175462422 readlink: use xmalloc_realpath()
Using realpath() directly with a non-NULL output buffer is unsafe because its
behavior is unspecified on systems which don't have PATH_MAX (ie. Hurd)

I beleive this also fixes a small bug whereby 'buf' would not be freed
on 'readlink -v' with ENABLE_FEATURE_CLEANUP.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:43:05 +02:00
Denys Vlasenko
d1516c4d62 dos2unix: fix the case w/o parameters
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-17 22:43:42 +02:00
Denys Vlasenko
8f65b0cf31 whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 18:46:02 +02:00
Pascal Bellard
21e8e8da64 libbb: introduce and use BB_EXECVP_or_die()
function                                             old     new   delta
BB_EXECVP_or_die                                       -      47     +47
time_main                                           1042    1043      +1
chrt_main                                            371     364      -7
ionice_main                                          292     282     -10
setsid_main                                           69      56     -13
nohup_main                                           236     223     -13
cttyhack_main                                        266     253     -13
chroot_main                                           94      81     -13
chpst_main                                           746     733     -13
timeout_main                                         297     279     -18
taskset_main                                         541     522     -19
vfork_child                                           67      45     -22
parse                                                975     953     -22
lpd_main                                             770     748     -22
launch_helper                                        192     170     -22
tcpudpsvd_main                                      1810    1782     -28
nice_main                                            190     156     -34
env_main                                             242     206     -36
run_command                                          221     174     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352)         Total: -304 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 00:57:03 +02:00
Denys Vlasenko
41ddd9f606 *: make exec failure message more consistent
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 01:46:53 +02:00
Denys Vlasenko
4ebdae3777 date: make %N work without -lrt on glibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 02:55:48 +02:00
Seb
d2d327db6d stat: make output more similar to GNU stat
Signed-off-by: Seb <sbb@tuxfamily.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-12 21:57:50 +02:00
Denys Vlasenko
e2b41cfb4b date: trivial fix - was reading seconds into nanoseconds field! DOH
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-12 03:32:22 +02:00
Denys Vlasenko
d70e0e995e *: add INSERTs to *.src files where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 12:15:11 +02:00
Denys Vlasenko
b68bba5649 date: use the same code for FEATURE_DATE_NANO for glibc and uclibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 04:39:30 +02:00