Commit Graph

1761 Commits

Author SHA1 Message Date
Denys Vlasenko
c13ee8c0f3 basename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argument
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:58:30 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
ca18311d0a libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-07 17:52:20 +02:00
Denys Vlasenko
e3d8d077b7 small fix for HISTFILESIZE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31 14:39:38 +02:00
Denys Vlasenko
2c4de5b045 ash,hush: optional support for $HISTFILESIZE.
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com)

function                                             old     new   delta
size_from_HISTFILESIZE                                 -      44     +44
hush_main                                            998    1025     +27
ash_main                                            1348    1374     +26
read_line_input                                     3361    3372     +11
new_line_input_t                                      17      24      +7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31 13:16:52 +02:00
Denys Vlasenko
353680aa46 lineedit: fixes for CONFIG_UNICODE_USING_LOCALE=y
function                                             old     new   delta
load_string                                           45      91     +46
save_string                                           40      82     +42
reinit_unicode                                        34      61     +27
BB_PUTCHAR                                            97     120     +23
init_unicode                                          17      37     +20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 158/0)             Total: 158 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 01:18:07 +01:00
Denys Vlasenko
20704f0662 ash,hush: recheck LANG before every line input
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-23 17:59:27 +01:00
Vitaly Magerya
7f4b769c42 don't call freeaddinfo(NULL)
Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-22 20:14:26 +01:00
Denys Vlasenko
5c942713b7 busybox: fail if --install is not given an absolute path
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-12 06:08:28 +01:00
Denys Vlasenko
8345b2bd5e libbb: make warning go away
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-12 02:19:50 +01:00
Denys Vlasenko
f8416dc6f6 forgot to add libbb/get_shell_name.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:02:42 +01:00
Denys Vlasenko
bd74e3d8be libbb/login/su: do not sanitize shell name twice
function                                             old     new   delta
setup_environment                                    191     205     +14
login_main                                          1002     987     -15
su_main                                              474     458     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-31)            Total: -17 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 18:49:40 +01:00
Denys Vlasenko
4a2a86d5e7 improve --install operation in chroot jails
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 06:02:31 +01:00
Alexey Fomenko
ea6116ee59 libbb: remove dead code in getopt32. -7 bytes
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01 19:25:49 +01:00
Denys Vlasenko
7d65abea09 libbb: make user/group name cache strings longer (~27 chars)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01 16:27:13 +01:00
Denys Vlasenko
e3b1a1fd28 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 22:24:08 +01:00
Dan Fandrich
dc50676cce Move stpcpy replacement function into libbb
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 18:37:12 +01:00
Denys Vlasenko
0b8a7723c7 typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12 01:56:25 +01:00
Denys Vlasenko
ab8d00d64f progress meter: fix bugs found in stall detection and unknown size logic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 19:09:30 +01:00
Denys Vlasenko
d55e139649 progress meter: move file name to bb_progress_t. +20 bytes
We were doing expensive unicode conversion on every update

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 18:56:13 +01:00
Denys Vlasenko
e52e67cb51 libbb/progress.c: make sure we never get negative ETA
function                                             old     new   delta
bb_progress_update                                   738     733      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 12:59:11 +01:00
Denys Vlasenko
838d4bb0cd progress meter: display >999 hours ETA correctly
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 23:35:52 +01:00
Denys Vlasenko
f836f01cc3 wget: shrink progress meter code; strink wget and add debug logging
function                                             old     new   delta
fgets_and_trim                                         -      73     +73
retrieve_file_data                                   367     349     -18
bb_progress_update                                   723     699     -24
wget_main                                           2220    2190     -30
ftpcmd                                               133      87     -46
gethdr                                               200     153     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 73/-165)           Total: -92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 23:02:28 +01:00
Denys Vlasenko
805aa9fec9 progress bar: better overflow protection; more precise bar
function                                             old     new   delta
bb_progress_update                                   639     749    +110

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 14:25:51 +01:00
Denys Vlasenko
dee0fc9da1 save 10 bytes on strings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 10:01:49 +01:00
Denys Vlasenko
df4e16c9af wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers
function                                             old     new   delta
base64enc                                              -      53     +53
gethdr                                               190     200     +10
ftpcmd                                               129     133      +4
progress_meter                                       160     122     -38
retrieve_file_data                                   431     392     -39
base64enc_512                                         46       -     -46
wget_main                                           2456    2220    -236
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 67/-359)          Total: -292 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 06:29:06 +01:00
Denys Vlasenko
66c5b12dbf ash: fix TMOUT not restoring tty attributes
function                                             old     new   delta
pgetc                                                420     500     +80
readtoken1                                          3202    3239     +37
read_line_input                                     3316    3337     +21
udhcpc_main                                         2610    2630     +20
file_get                                             266     272      +6
expandarg                                            958     963      +5
localcmd                                             257     259      +2
addLines                                              85      87      +2
read_line                                             94      95      +1
ed_main                                             2540    2541      +1
timed_out                                              1       -      -1
lineedit_read_key                                    256     255      -1
alrm_sighandler                                       44       -     -44
cmdloop                                              539     434    -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151)          Total: 24 bytes
   text    data     bss     dec     hex filename
 887379     936   17200  905515   dd12b busybox_old
 887411     936   17192  905539   dd143 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08 05:07:02 +01:00
Denys Vlasenko
c5d0f15dbd libbb: spawn should remove child which failed to exec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 14:14:09 +01:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
6307357eff move nofork_save_area from libbb.h to vfork_daemon_rexec.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 19:05:25 +01:00
Denys Vlasenko
c71b469f5d libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exe
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 03:28:56 +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
aa4f9a2fd8 libbb/copy_file.c: use smallints instead of signed chars
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-28 19:14:17 +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
Davide Cavalca
9b3b9790b3 add ENABLE_FEATURE_SYSTEMD and use it in syslogd
Signed-off-by: Davide Cavalca <davide@geexbox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 02:26:03 +01:00
Denys Vlasenko
975c714183 nicer looking ifdef in libbb/makedev.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 23:53:12 +01:00
Chris Rees
6b1ce45598 FreeBSD compat for match_fstype
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 17:10:02 +01:00
Chris Rees
e22af94afb FreeBSD compat for makedev
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 17:07:40 +01:00
Chris Rees
e3c127d846 FreeBSD compat
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 17:04:59 +01:00
Denys Vlasenko
e9a40e3b91 libbb: make ndelay_no/off a bit more clever. +14 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 00:29:55 +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
10ee20b58b libbb: better comment in parse_date
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-17 14:23:42 +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
0f44c08560 libbb: progress indicator: use unicode support funcs instead of open-coding it
function                                             old     new   delta
bb_progress_update                                   729     641     -88

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-10 16:10:29 +01:00
Denys Vlasenko
84dba9c5bb tftp: fix bad interaction betweel poll() and alarm(). Closes bug 3061
This was breaking timeout handling.

function                                             old     new   delta
tftp_progress_update                                   -      45     +45
tftp_progress_done                                     -      32     +32
tftp_protocol                                       1839    1858     +19
tftp_progress_init                                     9      15      +6
tftp_main                                            298     286     -12
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 102/-12)            Total: 90 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-10 12:51:44 +01:00
Denys Vlasenko
f42c7b8fc1 suppress "'fast_strtol_10' defined but not used" warning
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-07 13:51:16 +01:00
Denys Vlasenko
327d2885ec kill[all[5]],pkill: make signal list show signal numbers, and show RTMIN/MAX
function                                             old     new   delta
print_signames                                        31      64     +33
signals                                              224     231      +7

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-03 13:08:58 +01:00
Denys Vlasenko
7b276fc175 kill[all[5]],pkill: more correct, and smaller, SIGRTMIN/MAX code
function                                             old     new   delta
__libc_current_sigrtmin                                6       -      -6
__libc_current_sigrtmax                                6       -      -6
get_signum                                           339     295     -44
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 0/1 up/down: 0/-56)             Total: -56 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-03 12:51:13 +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
Denys Vlasenko
2753aae0e8 libbb: optionally support RTMIN[+n] and RTMAX[-n] signal names
function                                             old     new   delta
get_signum                                           140     336    +196
__libc_allocate_rtsig                                  -      56     +56
__libc_current_sigrtmin                                -       6      +6
__libc_current_sigrtmax                                -       6      +6
current_rtmin                                          -       4      +4
current_rtmax                                          -       4      +4
bbconfig_config_bz2                                 4961    4962      +1
------------------------------------------------------------------------------
(add/remove: 6/0 grow/shrink: 2/0 up/down: 273/0)             Total: 273 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 01:17:03 +01:00