aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
AgeCommit message (Collapse)Author
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>
2010-06-27*: s/"/bin/sh"/DEFAULT_SHELL, run_shell() API fix, remove unneeded strdupLadislav Michl
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>
2010-06-24*: introduce and use bb_unsetenv_and_freeDenys Vlasenko
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>
2010-06-21bootchartd: added optional compat featuresDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07bbconfig: make it independent from printf functionsDenys Vlasenko
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>
2010-06-06pipe_progress: make it independent of printf machineryDenys Vlasenko
function old new delta bb_putchar_stderr - 24 +24 ParseField 494 471 -23 progress_meter 212 188 -24 xargs_main 888 842 -46 pipe_progress_main 151 105 -46 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/4 up/down: 24/-139) Total: -115 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30*: teach tar et. al. to understand .xz by heartDenys Vlasenko
function old new delta unpack_xz_stream - 4126 +4126 setup_unzip_on_fd 80 150 +70 open_zipped 113 131 +18 unpack_unxz 5 12 +7 send_tree 360 353 -7 unpack_xz_stream_stdin 3953 - -3953 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 4221/-3960) Total: 261 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-06rpm: code shrink. Now uses open_zipped's logic (factored out into ↵Denys Vlasenko
setup_unzip_on_fd()) function old new delta setup_unzip_on_fd - 80 +80 open_zipped 176 113 -63 rpm_main 1672 1355 -317 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-380) Total: -300 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06libbb: add skip_dev_pfx()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06telnetd: fill hostname field in utmp/wtmp recordsDenys Vlasenko
function old new delta get_lsa - 109 +109 make_new_session 438 504 +66 get_peer_lsa - 10 +10 ftpd_main 2340 2267 -73 get_sock_lsa 101 10 -91 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/2 up/down: 185/-164) Total: 21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05telnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363Denys Vlasenko
function old new delta write_new_utmp - 253 +253 skip_dev_pfx - 30 +30 handle_sigchld 42 72 +30 telnetd_main 1650 1673 +23 make_new_session 415 438 +23 ... login_main 1140 1148 +8 update_utmp 337 313 -24 write_wtmp 220 154 -66 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 11/6 up/down: 406/-115) Total: ~291 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05libbb: split update_utmp from login/getty in preparation to use it for telnetdDenys Vlasenko
function old new delta update_utent - 339 +339 login_main 1498 1128 -370 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370) Total: -31 bytes function old new delta update_utmp 246 337 +91 login_main 1128 1140 +12 getty_main 1908 1918 +10 ... update_utent 339 - -339 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368) Total: -249 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04libbb: factor out hex2bin() for infiniband address parserDenys Vlasenko
function old new delta hex2bin - 149 +149 in_ib 172 27 -145 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26Hurd compat fixes. Mostly dealing with absent PATH_MAXJérémie Koenig
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18*: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko
function old new delta parse 964 967 +3 udhcp_run_script 670 665 -5 singlemount 911 906 -5 mount_it_now 360 355 -5 inotifyd_main 521 516 -5 xspawn 21 - -21 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-11lineedit: fix another corner case with bad unicode inputDenys Vlasenko
function old new delta read_key 607 646 +39 readit 50 55 +5 getch_nowait 290 295 +5 hash_find 233 234 +1 xstrtoul_range_sfx 231 230 -1 passwd_main 1058 1056 -2 builtin_exit 45 43 -2 cmp_main 649 645 -4 lineedit_read_key 257 245 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/5 up/down: 50/-21) Total: 29 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-09lineedit: invalid unicode characters are replaced with CONFIG_SUBST_WCHARTomas Heinrich
function old new delta read_key_ungets - 50 +50 lineedit_read_key 223 252 +29 Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-05tftp: do not show progress bar if we get error right away. +13 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26su: move restricted_shell into su.c (the only user)Denys Vlasenko
function old new delta su_main 448 468 +20 buffer_fill_and_print 179 196 +17 scriptreplay_main 205 208 +3 localcmd 275 277 +2 hash_find 233 234 +1 devmem_main 469 463 -6 install_main 724 716 -8 setusershell 11 - -11 find_pair 187 169 -18 restricted_shell 49 - -49 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 5/3 up/down: 43/-92) Total: -49 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26setup_environment(): eliminate one parameterDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26crontab: use setup_environmentBernhard Reutner-Fischer
function old new delta setup_environment 184 198 +14 .rodata 131770 131747 -23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-23) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-02more thorough fix for systems with strange socklen_tDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02stat: get rid on intmax_tDenys Vlasenko
function old new delta print_it 225 218 -7 print_stat 919 889 -30 print_statfs 370 339 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-68) Total: -68 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-01mkXXXX: unify [KBYTES] parameter handling (added it to mkswap)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-31ls: unicode fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18ls: make it so that group never glues itself to file sizeDenys Vlasenko
+ smaller enhancements: inode is long long; -h is a bit narrower; etc Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-15cp: fix -H handlingDenys Vlasenko
function old new delta copy_file 1495 1518 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12libbb: introduce and use monotonic_msDenys Vlasenko
function old new delta monotonic_ms - 60 +60 process_stdin 433 443 +10 display_speed 85 90 +5 nmeter_main 672 674 +2 builtin_type 114 116 +2 bb__parsespent 117 119 +2 ifplugd_main 1110 1109 -1 acpid_main 441 440 -1 chat_main 1361 1359 -2 doCommands 2458 2449 -9 arpping 466 450 -16 run_command 268 234 -34 readcmd 1072 1034 -38 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101) Total: -20 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09*: make it easier to distinquish "struct tm", pointer to one, etcDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04*: make 2 more "int argc"'s unused; more saved if !DESKTOPDenys Vlasenko
function old new delta sync_main 18 20 +2 tty_main 90 87 -3 iprule_list 83 79 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-28*: remove a few more cases of argc usage. -89 bytes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-25ntpd: and real handling for -N, show usage w/o options; trim textDenys Vlasenko
function old new delta ntp_init 317 348 +31 bb_msg_you_must_be_root - 17 +17 xsocket 66 76 +10 changepath 195 194 -1 bb_msg_perm_denied_are_you_root 35 34 -1 send_tree 355 353 -2 count_lines 74 72 -2 must_be_root 17 - -17 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/4 up/down: 58/-23) Total: 35 bytes text data bss dec hexfilename 832873 441 7548 840862 cd49ebusybox_old 832839 441 7548 840828 cd47cbusybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24ntpd: locally bind every peer socket. +22 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18libbb: robustify isXXXX(). +39 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15libbb: added xfdopen_for_read/writeDenys Vlasenko
function old new delta xfdopen_helper - 40 +40 logdir_open 1163 1184 +21 process_stdin 433 443 +10 xfdopen_for_write - 9 +9 doCommands 2465 2474 +9 patch_main 1214 1222 +8 bbunpack 457 465 +8 xfdopen_for_read - 7 +7 scan_tree 258 262 +4 xstrtoul_range_sfx 230 231 +1 sendmail_main 957 955 -2 passwd_main 1027 1023 -4 parse 969 964 -5 test_main 253 247 -6 sed_main 655 649 -6 dos2unix_main 437 429 -8 fbsplash_main 950 938 -12 handle_dir_common 371 354 -17 expand_vars_to_list 2197 2169 -28 update_passwd 1275 1246 -29 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117) Total: 0 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-14use utimes() rather than obsolescent utime()Bernhard Reutner-Fischer
utime is obsolescent in POSIX.1-2008, use utimes() for now. Untested. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-08wget: factor out progress bar codeMagnus Damm
Signed-off-by: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-04libbb.h: remove two over-zealous RETURNS_MALLOCDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02include/libbb.h: mark malloc-returning functions with GCC attributeDenys Vlasenko
function old new delta ash_main 1336 1365 +29 readcmd 1062 1072 +10 add_split_dependencies 707 717 +10 rtnl_talk 539 548 +9 normalize 165 174 +9 xmalloc_optname_optval 583 590 +7 test_main 247 253 +6 insert_bg_job 366 371 +5 dname_enc 391 395 +4 nslookup_main 165 168 +3 ifplugd_main 1099 1102 +3 tftpd_main 493 495 +2 make_new_session 413 415 +2 localcmd 274 276 +2 date_main 696 698 +2 tee_main 317 318 +1 setvar 183 184 +1 hash_find 233 234 +1 xrtnl_dump_filter 400 399 -1 prepend_new_eth_table 297 295 -2 unpack_Z_stream 1229 1226 -3 read_line_input 4823 4820 -3 do_load 523 520 -3 udhcp_run_script 669 665 -4 mkfs_vfat_main 1609 1605 -4 rtnl_rtprot_initialize 70 65 -5 procps_scan 1842 1835 -7 read_opt 873 865 -8 ifupdown_main 2133 2125 -8 mkfs_ext2_main 2492 2482 -10 logread_main 503 492 -11 svlogd_main 1441 1429 -12 rewrite 1032 1018 -14 fbsplash_main 917 903 -14 str2sockaddr 431 405 -26 unpack_lzma_stream 2705 2677 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 18/18 up/down: 106/-163) Total: -57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02*: introduce and use ffulsh_all()Denys Vlasenko
function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27add and use xopen_nonblocking (-18b)Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26read_key: remove handling for ctrl-up/down, we don't use that. -12 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25lineedit: handle Ctrl-arrowsDenys Vlasenko
function old new delta read_line_input 4629 4824 +195 BB_isalnum - 39 +39 BB_ispunct - 35 +35 BB_isspace - 31 +31 static.esccmds 69 93 +24 vi_word_motion 165 162 -3 vi_back_motion 204 198 -6 vi_end_motion 172 163 -9 bb_iswspace 28 - -28 bb_iswpunct 32 - -32 bb_iswalnum 37 - -37 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 5/8 up/down: 334/-129) Total: 205 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>