aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* progress bar: better overflow protection; more precise barDenys Vlasenko2011-02-101-2/+3
| | | | | | | function old new delta bb_progress_update 639 749 +110 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use unistd.h before _POSIX_VERSIONDenys Vlasenko2011-02-081-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix TMOUT not restoring tty attributesDenys Vlasenko2011-02-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* incorporate header fixes proposed in bug 3097Denys Vlasenko2011-02-071-0/+3
| | | | | | Not sure these are *really* needed, but I suppose they don't hurt Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: optional support for $TMOUT variableDenys Vlasenko2011-02-041-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move nofork_save_area from libbb.h to vfork_daemon_rexec.cDenys Vlasenko2011-02-021-11/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: use FEATURE_SH_NOFORK to enable NOFORK trickDenys Vlasenko2011-02-021-0/+1
| | | | | | Also expands docs 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-021-5/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move utmp.h include to libbb.hDenys Vlasenko2011-01-251-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* add ENABLE_FEATURE_SYSTEMD and use it in syslogdDavide Cavalca2011-01-251-0/+6
| | | | | Signed-off-by: Davide Cavalca <davide@geexbox.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nicer looking ifdef in libbb/makedev.cDenys Vlasenko2011-01-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* FreeBSD compatChris Rees2011-01-241-6/+9
| | | | | Signed-off-by: Chris Rees <utisoft@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* FreeBSD compatChris Rees2011-01-241-0/+6
| | | | | Signed-off-by: Chris Rees <utisoft@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make ndelay_no/off a bit more clever. +14 bytesDenys Vlasenko2011-01-241-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* insmod: check for module read errorsDenys Vlasenko2011-01-171-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move passwd, shadow, group and gshadow path definitions to libbb.hTito Ragusa2011-01-161-4/+17
| | | | | | | ...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>
* pstree: new applet. +1664 bytesLauri Kasanen2010-12-051-0/+1
| | | | | | | | | 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>
* *: whitespace fixesDenys Vlasenko2010-10-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use common crc32 routineDenys Vlasenko2010-10-271-4/+3
| | | | | | | | | | | | | | | | | | 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>
* fdisk: initial stab at GPT partition supportKevin Cernekee2010-10-251-2/+5
| | | | | Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove unused SC_x (serial port names) definesDenys Vlasenko2010-10-241-22/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use strcpy_and_process_escape_sequencesDenys Vlasenko2010-10-231-0/+1
| | | | | | | | | | | | 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>
* *: introduce and use xmkstemp. -65 bytes.Alexander Shishkin2010-10-221-0/+1
| | | | | Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256Denys Vlasenko2010-10-191-30/+14
| | | | | | | | | | | | | | 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>
* hash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytesDenys Vlasenko2010-10-181-23/+23
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bitsDenys Vlasenko2010-10-181-2/+5
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: use SWAP_BE64 instead of open-coding itDenys Vlasenko2010-10-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* bring md5 and sha1 names closer. no code changesDenys Vlasenko2010-10-171-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shaN: code shrinkDenys Vlasenko2010-10-171-2/+2
| | | | | | | | | | | | 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>
* md5: code shrink; and use 64-byte temp buf, not 128-byte.Denys Vlasenko2010-10-161-1/+1
| | | | | | | | | | | | | | 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>
* *: pass md5/shaN context pointer as 1st arg, not lastDenys Vlasenko2010-10-161-6/+6
| | | | | | | | | 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>
* libbb/md5: code shrinkDenys Vlasenko2010-10-161-1/+0
| | | | | | | | | 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>
* libbb: merge mail and uudecode's base64 decodersDenys Vlasenko2010-09-161-0/+6
| | | | | | | | | | | | | | | 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>
* libbb: xfunc_error_retval can be a byteDenys Vlasenko2010-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* better shared strings trickDenys Vlasenko2010-09-011-10/+25
| | | | | | | | 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>
* libbb: add xfstat functionDenys Vlasenko2010-08-311-0/+1
| | | | | | | | | | | | | | | | 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>
* pmap: new applet. +1k.Alexander Shishkin2010-08-281-7/+24
| | | | | | | | | | | | | | | | | | | 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>
* patch: support "patch [FILE [PATCH]]" formatDenys Vlasenko2010-08-221-0/+1
| | | | | | | | function old new delta xopen_stdin - 15 +15 patch_main 2075 2041 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-2/+2
| | | | | | | 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>
* libbb: factor out common code from mpstat/iostatDenys Vlasenko2010-08-161-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_iDenys Vlasenko2010-08-121-3/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* OpenBSD compatibilityWaldemar Brodkorb2010-08-061-7/+7
| | | | | Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb.h: add device names for Hurd and FreeBSDJeremie Koenig2010-07-191-5/+21
| | | | | | | | 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>
* *: introduce and use xfork() and xvfork()Pascal Bellard2010-07-041-4/+17
| | | | | | | | | | | | | | | | 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>
* libbb: introduce and use BB_EXECVP_or_die()Pascal Bellard2010-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* losetup: use LOOP_foo definesLauri Kasanen2010-07-041-6/+6
| | | | | Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: s/"/bin/sh"/DEFAULT_SHELL, run_shell() API fix, remove unneeded strdupLadislav Michl2010-06-271-4/+3
| | | | | | | | | | function old new delta run_shell 157 166 +9 su_main 477 470 -7 sulogin_main 515 503 -12 Signed-off-by: Ladislav Michl <Ladislav.Michl@seznam.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use bb_unsetenv_and_freeDenys Vlasenko2010-06-241-0/+1
| | | | | | | | | | | | | function old new delta bb_unsetenv_and_free - 17 +17 tcpudpsvd_main 1819 1810 -9 safe_setenv 58 47 -11 udhcp_run_script 630 616 -14 make_device 1683 1663 -20 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/4 up/down: 17/-54) Total: -37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: added optional compat featuresDenys Vlasenko2010-06-211-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bbconfig: make it independent from printf functionsDenys Vlasenko2010-06-071-0/+2
| | | | | | | | | | | | | | function old new delta full_write2_str - 25 +25 full_write1_str - 25 +25 clear_main 21 20 -1 telnet_main 1488 1477 -11 getty_main 1932 1918 -14 full_write22_str 25 - -25 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>