aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
AgeCommit message (Collapse)Author
2011-03-08use user's shell instead of hardwired "/bin/sh" (android needs this)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01libbb: make user/group name cache strings longer (~27 chars)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11progress meter: fix bugs found in stall detection and unknown size logicDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11progress meter: move file name to bb_progress_t. +20 bytesDenys Vlasenko
We were doing expensive unicode conversion on every update Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10progress bar: better overflow protection; more precise barDenys Vlasenko
function old new delta bb_progress_update 639 749 +110 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08use unistd.h before _POSIX_VERSIONDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08ash: fix TMOUT not restoring tty attributesDenys Vlasenko
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-07incorporate header fixes proposed in bug 3097Denys Vlasenko
Not sure these are *really* needed, but I suppose they don't hurt Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-04ash: optional support for $TMOUT variableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02move nofork_save_area from libbb.h to vfork_daemon_rexec.cDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02hush: use FEATURE_SH_NOFORK to enable NOFORK trickDenys Vlasenko
Also expands docs Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25move utmp.h include to libbb.hDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25add ENABLE_FEATURE_SYSTEMD and use it in syslogdDavide Cavalca
Signed-off-by: Davide Cavalca <davide@geexbox.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24nicer looking ifdef in libbb/makedev.cDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24FreeBSD compatChris Rees
Signed-off-by: Chris Rees <utisoft@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24FreeBSD compatChris Rees
Signed-off-by: Chris Rees <utisoft@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24libbb: make ndelay_no/off a bit more clever. +14 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-17insmod: check for module read errorsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16move passwd, shadow, group and gshadow path definitions to libbb.hTito Ragusa
...and define them only if the used libc doesn't. Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05pstree: new applet. +1664 bytesLauri Kasanen
text data bss dec hex filename 883379 936 17192 901507 dc183 busybox_old 885043 936 17192 903171 dc803 busybox_unstripped Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28*: whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27libbb: introduce and use common crc32 routineDenys Vlasenko
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-25fdisk: initial stab at GPT partition supportKevin Cernekee
Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24remove unused SC_x (serial port names) definesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23libbb: introduce and use strcpy_and_process_escape_sequencesDenys Vlasenko
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-22*: introduce and use xmkstemp. -65 bytes.Alexander Shishkin
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-19libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256Denys Vlasenko
function old new delta sha256_process_block64 421 433 +12 md5_crypt 578 587 +9 md5_begin 43 50 +7 md5_hash 99 97 -2 sha1_end 85 82 -3 md5_end 36 31 -5 common64_end 93 86 -7 sha1_hash 97 - -97 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18hash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-18*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bitsDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-18*: use SWAP_BE64 instead of open-coding itDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-17bring md5 and sha1 names closer. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17shaN: code shrinkDenys Vlasenko
function old new delta init512_lo 32 40 +8 init256 32 40 +8 sha256_begin 42 28 -14 sha512_begin 81 53 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-42) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-16md5: code shrink; and use 64-byte temp buf, not 128-byte.Denys Vlasenko
function old new delta md5_hash 111 108 -3 md5_end 129 125 -4 md5_hash_block 459 454 -5 filter_rename_config 250 244 -6 md5_crypt 587 578 -9 popmaildir_main 828 816 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-16*: pass md5/shaN context pointer as 1st arg, not lastDenys Vlasenko
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-16libbb/md5: code shrinkDenys Vlasenko
function old new delta md5_end 123 117 -6 md5_begin 49 42 -7 md5_hash 119 104 -15 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-16libbb: merge mail and uudecode's base64 decodersDenys Vlasenko
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-01libbb: xfunc_error_retval can be a byteDenys Vlasenko
function old new delta xfunc_die 55 60 +5 log_and_exit 43 45 +2 hush_main 961 963 +2 xfunc_error_retval 4 1 -3 tty_main 87 84 -3 sv_main 1183 1180 -3 sort_main 804 801 -3 run_applet_no_and_exit 440 437 -3 puts_maybe_newline 198 195 -3 nohup_main 228 225 -3 httpd_main 753 750 -3 get_header_tar 1496 1493 -3 fsck_minix_main 2972 2969 -3 expr_main 110 107 -3 cmp_main 641 638 -3 chat_main 1359 1356 -3 builtin_exit 48 45 -3 arping_main 1587 1584 -3 BB_EXECVP_or_die 47 44 -3 send_cgi_and_exit 901 895 -6 diff_main 1197 1191 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/18 up/down: 9/-60) Total: -51 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01better shared strings trickDenys Vlasenko
text data bss dec hex filename 861980 441 7540 869961 d4649 busybox_old 861914 441 7540 869895 d4607 busybox_unstripped Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-31libbb: add xfstat functionDenys Vlasenko
function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-28pmap: new applet. +1k.Alexander Shishkin
pmap is a tool used to look at processes' memory maps, normally found in procps package. It provides more readable and easily sortable output (one line per mapping) from maps/smaps files in /proc/PID/. This would help in debugging memory usage issues, especially on devices where lots of typing is not a viable option. This patch does'n implement -d and -A command line options of GNU pmap, since those are not that must have features and I was afraid of going blind from looking at its code. The implementation takes smaps scanning part out of procps_scan() function and moves it into procps_read_smaps(), which does more detailed processing of a single PID's smaps data. Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-22patch: support "patch [FILE [PATCH]]" formatDenys Vlasenko
function old new delta xopen_stdin - 15 +15 patch_main 2075 2041 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
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-16libbb: factor out common code from mpstat/iostatDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_iDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06OpenBSD compatibilityWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19libbb.h: add device names for Hurd and FreeBSDJeremie Koenig
Adapted from include.libbb.diff from the Debian kFreeBSD people: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04*: introduce and use xfork() and xvfork()Pascal Bellard
function old new delta launch_helper 170 169 -1 setup_heredoc 312 302 -10 handle_dir_common 367 354 -13 expand_vars_to_list 2456 2443 -13 open_transformer 89 74 -15 data_extract_to_command 439 423 -16 do_ipaddr 1406 1389 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04libbb: introduce and use BB_EXECVP_or_die()Pascal Bellard
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-04losetup: use LOOP_foo definesLauri Kasanen
Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>