aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* libbb: split bb_get_chunk_from_file and bb_get_chunk_with_continuationDenys Vlasenko2011-06-172-43/+51
| | | | | | | | | | | | | | | | | | This also moves bb_get_chunk_with_continuation into its sole user, parse_config.c. This allows to optimize both functions separately, they need to be optimized for speed. (this need was highlighted by slow modprobe caused in part by slow bb_get_chunk_with_continuation in config parser). function old new delta bb_get_chunk_from_file 7 130 +123 config_read 457 558 +101 bb_get_chunk_with_continuation 194 - -194 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 2/0 up/down: 224/-194) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* appletlib.c: do not use PAGE_SIZE for malloc tweakingDenys Vlasenko2011-06-031-13/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* only compile obscure.c when neededDan Fandrich2011-06-031-2/+1
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775Denys Vlasenko2011-05-291-1/+3
| | | | | | | | | When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries to include getopt.h which is not available; for example with uClibc when !UCLIBC_HAS_GETOPT_LONG. getopt.h is only required for the _long set of functions. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: cater for libc w/o FNM_CASEFOLDDenys Vlasenko2011-05-233-20/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: fix rare SEGV; mark a few FIXMEsAlexey Fomenko2011-05-201-9/+15
| | | | | Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* warning removalCristian Ionescu-Idbohrn2011-05-201-1/+1
| | | | | Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* busybox.conf: code shrinkDenys Vlasenko2011-05-161-13/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* busybox.conf: USER.GROUP is _optional_Denys Vlasenko2011-05-161-7/+6
| | | | | | | function old new delta main 785 809 +24 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* main: make busybox.conf mode handling less obscureDenys Vlasenko2011-05-161-33/+34
| | | | | | | | | | | | | function old new delta static.mode_mask - 20 +20 main 782 785 +3 static.mode_chars 15 13 -2 run_applet_no_and_exit 450 441 -9 mode_mask 24 - -24 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 1/2 up/down: 41/-53) Total: -12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* main: free suid_config list after useDenys Vlasenko2011-05-162-34/+31
| | | | | | | | | | | | | | | | | | | function old new delta run_applet_no_and_exit 438 450 +12 ifupdown_main 2147 2149 +2 writeFileToTarball 1325 1326 +1 pidof_main 244 245 +1 last_main 896 897 +1 grep_main 779 780 +1 find_list_entry2 121 122 +1 tar_main 835 833 -2 llist_unlink 28 26 -2 llist_rev 23 21 -2 main 791 782 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/4 up/down: 19/-15) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* simplify parsing of /etc/busybox.confDenys Vlasenko2011-05-161-45/+30
| | | | | | | function old new delta parse_config_file 799 667 -132 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix "variable 'foo' set but not used" warningsDenys Vlasenko2011-05-131-5/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* adduser: safe username passing to passwd/addgroupDenys Vlasenko2011-05-131-2/+23
| | | | | | | | | | | | | | | | | | | passwd: support creating SHA passwords random code shrink function old new delta crypt_make_pw_salt - 87 +87 adduser_main 883 904 +21 ... crypt_make_salt 99 89 -10 chpasswd_main 329 312 -17 packed_usage 28731 28691 -40 passwd_main 1070 1000 -70 cryptpw_main 310 224 -86 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288) Total: -134 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: make read builtin interruptible.Denys Vlasenko2011-05-081-4/+5
| | | | | | | | | | | | | | | function old new delta builtin_read 185 471 +286 check_and_run_traps 200 262 +62 nonblock_immune_read 73 119 +46 sigismember - 44 +44 record_signal - 21 +21 sigisemptyset - 16 +16 ... ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46) Total: 437 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of ↵Denys Vlasenko2011-05-081-5/+7
| | | | | | xmalloc_reads Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* straighten out dprintf/fdprintf mess; remove old "define lchown chown"Denys Vlasenko2011-04-171-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* small fixes atop syslog config patchDenys Vlasenko2011-04-161-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix double words in comments. No code changesMarek Polacek2011-04-161-1/+1
| | | | | Signed-off-by: Marek Polacek <mpolacek@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* basename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argumentDenys Vlasenko2011-04-111-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+6
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.Denys Vlasenko2011-04-071-7/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* small fix for HISTFILESIZEDenys Vlasenko2011-03-311-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: optional support for $HISTFILESIZE.Denys Vlasenko2011-03-312-17/+32
| | | | | | | | | | | | | 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>
* lineedit: fixes for CONFIG_UNICODE_USING_LOCALE=yDenys Vlasenko2011-03-272-48/+66
| | | | | | | | | | | | | 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>
* ash,hush: recheck LANG before every line inputDenys Vlasenko2011-03-231-11/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* don't call freeaddinfo(NULL)Vitaly Magerya2011-03-222-9/+12
| | | | | Signed-off-by: Vitaly Magerya <vmagerya@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* busybox: fail if --install is not given an absolute pathDenys Vlasenko2011-03-121-4/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make warning go awayDenys Vlasenko2011-03-121-4/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* forgot to add libbb/get_shell_name.cDenys Vlasenko2011-03-081-0/+25
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/login/su: do not sanitize shell name twiceDenys Vlasenko2011-03-061-0/+3
| | | | | | | | | | | 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>
* improve --install operation in chroot jailsDenys Vlasenko2011-03-061-5/+16
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: remove dead code in getopt32. -7 bytesAlexey Fomenko2011-03-011-10/+5
| | | | | Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make user/group name cache strings longer (~27 chars)Denys Vlasenko2011-03-012-9/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"Denys Vlasenko2011-02-261-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Move stpcpy replacement function into libbbDan Fandrich2011-02-131-0/+11
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixDenys Vlasenko2011-02-121-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* progress meter: fix bugs found in stall detection and unknown size logicDenys Vlasenko2011-02-111-23/+32
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* progress meter: move file name to bb_progress_t. +20 bytesDenys Vlasenko2011-02-111-13/+11
| | | | | | We were doing expensive unicode conversion on every update Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/progress.c: make sure we never get negative ETADenys Vlasenko2011-02-111-16/+17
| | | | | | | function old new delta bb_progress_update 738 733 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* progress meter: display >999 hours ETA correctlyDenys Vlasenko2011-02-101-4/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: shrink progress meter code; strink wget and add debug loggingDenys Vlasenko2011-02-101-30/+65
| | | | | | | | | | | | | | 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>
* progress bar: better overflow protection; more precise barDenys Vlasenko2011-02-101-23/+31
| | | | | | | function old new delta bb_progress_update 639 749 +110 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* save 10 bytes on stringsDenys Vlasenko2011-02-101-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfersDenys Vlasenko2011-02-101-1/+1
| | | | | | | | | | | | | | | 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>
* ash: fix TMOUT not restoring tty attributesDenys Vlasenko2011-02-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libbb: spawn should remove child which failed to execDenys Vlasenko2011-02-031-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixesDenys Vlasenko2011-02-032-5/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move nofork_save_area from libbb.h to vfork_daemon_rexec.cDenys Vlasenko2011-02-022-30/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exeDenys Vlasenko2011-02-022-11/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>