aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
AgeCommit message (Collapse)Author
2008-02-24less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)Denis Vlasenko
*: minor shrink
2008-02-23less: update line input so that it doesn't interfere withDenis Vlasenko
screen update. Makes "man bash", [enter], [/], <enter search pattern>, [enter] more usable - manpage draws as you enter the pattern! Yay!! less: fix bug where backspace wasn't actually deleting chars less: "examine file with empty name" doesn't abort anymore. libbb: add "all fatal signals" mask. getch_nowait - 207 +207 status_print - 105 +105 examine_file 64 87 +23 move_cursor - 16 +16 m_status_print 185 195 +10 less_main 1656 1663 +7 decode_format_string 790 795 +5 test_main 403 405 +2 process0_stdin 247 249 +2 passwd_main 1070 1072 +2 less_gets 196 178 -18 buffer_print 169 71 -98 less_getch 362 138 -224 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/3 up/down: 379/-340) Total: 39 bytes text data bss dec hex filename 798329 740 7484 806553 c4e99 busybox_old 798368 740 7484 806592 c4ec0 busybox_unstripped
2008-02-20libbb: introduce and use nonblock_safe_read(). Yay!Denis Vlasenko
Our shells are immune from this nasty O_NONBLOCK now! function old new delta nonblock_safe_read - 78 +78 file_get 276 295 +19 generateMTFValues 428 435 +7 read_line_input 1776 1772 -4 preadbuffer 543 450 -93 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/2 up/down: 104/-97) Total: 7 bytes text data bss dec hex filename 615190 715 23924 639829 9c355 busybox_old 615168 715 23924 639807 9c33f busybox_unstripped
2008-02-18mount: recognize "dirsync" (closes bug 835)Denis Vlasenko
mount: sanitize environ if called by non-root *: adjust for slightly different sanitize routine
2008-02-17libbb: introduce and use xrename and rename_or_warn.Denis Vlasenko
2008-02-16libbb: introduce bb_signals and bb_signals_recursive,Denis Vlasenko
which sets same handler for many signals. sig_catch is nuked (bb_signals_recursive is more descriptive name). *: use them as appropriate. function old new delta bb_signals_recursive - 95 +95 bb_signals - 52 +52 run_command 258 273 +15 svlogd_main 1368 1377 +9 runsv_main 1746 1752 +6 runsvdir_main 1643 1646 +3 UNSPEC_print 64 66 +2 time_main 1128 1127 -1 ... resize_main 246 210 -36 sig_catch 63 - -63 set_fatal_sighandler 85 14 -71 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548) Total: -366 bytes
2008-02-16*: more readable handling of pipe fds. No code changes.Denis Vlasenko
2008-02-16random s/short/int/Denis Vlasenko
add_cmd 1189 1190 +1 xconnect_ftpdata 118 117 -1 data_align 86 84 -2 process_files 2101 2096 -5 forkexec 1345 1334 -11
2008-02-10hush: reinstate `cmd` handling for NOMMU (with fat big warning).Denis Vlasenko
hush: fix a case where none of pipe members could be started because of fork failure hush: rename functions: xxx_real -> xxx hush: try to add a bit more of vfork-friendliness hush: add rudimentary design docs hush: add TODO (newly discovered bug with globbing)
2008-02-07some more fixes for cross-compiling on an OS X host: apple provides core ↵Mike Frysinger
types so dont redefine them, sys/statfs.h is not available, and only use some newer AF_* defines if they are actually available
2008-02-07only include mntent.h according to HAVE_MNTENT_H and dont define this on OS XMike Frysinger
2008-02-02msh: fix Ctrl-C handling with line editingDenis Vlasenko
2008-01-29- be C99 friendly. Anonymous unions are a GNU extension. This change isBernhard Reutner-Fischer
size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 mode.
2008-01-28*: tidy up usage of char **environDenis Vlasenko
2008-01-13- fix commentary typoBernhard Reutner-Fischer
2008-01-06ps: fix overflow in USER and VSZ columnsDenis Vlasenko
function old new delta smart_ulltoa4 - 280 +280 smart_ulltoa5 283 408 +125 ulltoa6_and_space - 25 +25 scale 28 38 +10 bbunpack 358 366 +8 ps_main 259 261 +2 glob3 35 37 +2 fill_bounds 172 174 +2 process_stdin 456 446 -10 smart_ulltoa6 406 - -406 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 6/1 up/down: 454/-416) Total: 38 bytes
2008-01-05ps: add conditional support for -o [e]timeDenis Vlasenko
2008-01-02libbb: introduce and use safe_waitpid (loops in EINTR)Denis Vlasenko
*: use more approproate (shorter) versions of wait() function old new delta safe_waitpid - 48 +48 wait_any_nohang - 17 +17 send_tree 365 369 +4 processorstop 432 435 +3 text_yank 110 108 -2 make_human_readable_str 202 200 -2 crond_main 1368 1366 -2 handle_sigchld 49 43 -6 reapchild 166 159 -7 custom 260 250 -10 checkscript 191 177 -14 wait_nohang 17 - -17 wait_pid 43 - -43 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103) Total: -31 bytes
2007-12-30libbb: introduce fputc_printable (from ed)Denis Vlasenko
netstat: print control chars as ^C etc vi: style fixlet function old new delta fputc_printable - 100 +100 unix_do_one 451 487 +36 printLines 258 190 -68 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 136/-68) Total: 68 bytes
2007-12-26Fix xmalloc_fgets_str so that it really does NOT strip terminator.Denis Vlasenko
Add xmalloc_fgetline_str which does strip terminator, and use it in dpkg instead of xmalloc_fgets_str. netstat: use xmalloc_fgets_str - allows to eat strings with NULs (this fixes bug with some weird /proc/net/unix input) function old new delta xmalloc_fgets_internal - 191 +191 xmalloc_fgetline_str - 18 +18 do_info 116 120 +4 unix_do_one 451 447 -4 tcp_do_one 423 419 -4 send_tree 369 365 -4 xmalloc_fgets_str 178 15 -163 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175) Total: 38 bytes text data bss dec hex filename 778445 832 7344 786621 c00bd busybox_old 778483 832 7344 786659 c00e3 busybox_unstripped
2007-11-28reorganize applet table. Eliminates pointers to names.Denis Vlasenko
Should be a big win for libbusybox. busybox wins too: text data bss dec hex filename 776524 929 9100 786553 c0079 busybox_old 775903 929 9100 785932 bfe0c busybox_unstripped
2007-11-24remove echo_main -> bb_echo indirectionDenis Vlasenko
2007-11-22ash: fix bug where redirection of closed fd was leaving it open afterwards.Denis Vlasenko
redirect 983 1024 +41 bb_echo 276 301 +25 popredir 118 132 +14 evalcommand 1163 1176 +13 bbunpack 358 366 +8 echocmd 13 5 -8 echo_main 13 5 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/2 up/down: 101/-16) Total: 85 bytes text data bss dec hex filename 774999 962 9236 785197 bfb2d busybox_old 775084 962 9236 785282 bfb82 busybox_unstripped
2007-11-18ip: stop propagating argc; optimize ip_parse_common_argsDenis Vlasenko
function old new delta find_pair 167 187 +20 static.families - 17 +17 die_must_be_on_off - 11 +11 ... on_off 33 22 -11 do_ipaddr 103 90 -13 do_iptunnel 1001 986 -15 iproute_list_or_flush 1237 1217 -20 static.ip_common_commands 43 22 -21 do_iproute 2217 2193 -24 parse_args 1444 1414 -30 ip_do 47 16 -31 do_iprule 994 963 -31 ip_main 153 113 -40 ipaddr_modify 1357 1305 -52 ipaddr_list_or_flush 2543 2490 -53 ip_parse_common_args 294 159 -135 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 4/24 up/down: 85/-563) Total: -478 bytes text data bss dec hex filename 775561 966 9236 785763 bfd63 busybox_old 775073 962 9236 785271 bfb77 busybox_unstripped
2007-11-16dmesg,klogd: make code more readableDenis Vlasenko
libbb: explain why we declare klogctl libbb: move defs around so that order makes more sense
2007-11-08xmalloc_follow_symlinks() -- fix ELOOP issue with absolute paths,Paul Fox
return full path in cases where path doesn't resolve to a link. change name to better differentiate from xmalloc_readlink().
2007-11-08new xmalloc_readlink_follow() routine to fully expand trailing symlinksPaul Fox
to get to a "real" file (or directory).
2007-11-06login: clear dangerous environment variables if started by non-rootDenis Vlasenko
2007-11-04ifconfig: code shrinkDenis Vlasenko
adjtimex: code shrink libbb: move nth_string function into libbb hdparm: nth_string was here text data bss dec hex filename 730013 10334 12032 752379 b7afb busybox_old 730093 10134 12032 752259 b7a83 busybox_unstripped
2007-10-20ping: fix breakage from -I fixDenis Vlasenko
passwd: SELinux support by KaiGai Kohei <kaigai@ak.jp.nec.com>
2007-10-13bzip2: port bzip2 1.0.4 to busybox. note: bzip2 code residesDenis Vlasenko
in separate directory (archival/bz/*) and is covered by BSD-style license. code size: 13k
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-10get rid of global "struct bb_applet *current_applet"Denis Vlasenko
2007-10-01'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko
263 bytes saved.
2007-09-30introduce and use close_on_exec_on(fd). -50 bytes.Denis Vlasenko
2007-09-30print_signames_and_exit -> print_signames (because of "ash calls kill_main")Denis Vlasenko
2007-09-29pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>Denis Vlasenko
2007-09-27remove stray '/*' within commentDenis Vlasenko
2007-09-27introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko
2007-09-27introduce safe_poll (fixes a problem in top)Denis Vlasenko
function old new delta safe_poll - 77 +77 svlogd_main 1470 1466 -4 zcip_main 1530 1524 -6 forkexec 1345 1338 -7 decode_format_string 795 788 -7 collect_blk 474 467 -7 buffer_pread 540 532 -8 tftp 1182 1172 -10 microcom_main 763 749 -14 arpping 441 424 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80) Total: -3 bytes text data bss dec hex filename 770162 1034 10404 781600 bed20 busybox_old 770158 1034 10404 781596 bed1c busybox_unstripped
2007-09-25documentation bits in comments, no code changesDenis Vlasenko
2007-09-24*: kill bb_get_last_path_component, replace with two functionsDenis Vlasenko
(one which strips trailing slash and one which does not) wget: straighten out as a result of above change text data bss dec hex filename 5056 1 0 5057 13c1 busybox.t4/networking/wget.o 5022 0 0 5022 139e busybox.t5/networking/wget.o
2007-09-10setup_environment: code shrinkDenis Vlasenko
run_shell: mark as NORETURN setup_environment, run_shell: add usage comments login: add FIXME :( function old new delta UNSPEC_print 64 66 +2 sulogin_main 509 506 -3 mkfs_minix_main 3070 3067 -3 login_main 1615 1612 -3 su_main 461 448 -13 setup_environment 261 206 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-77) Total: -75 bytes text data bss dec hex filename 772578 1051 10724 784353 bf7e1 busybox_old 772502 1051 10724 784277 bf795 busybox_unstripped
2007-09-08top: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,Denis Vlasenko
+80 bytes when disabled (mainly because of text wrapping fixes in display_process_list).
2007-09-05busybox --install -s: prevent puzzling "/bin/busybox: Invalid argument" messageDenis Vlasenko
libbb: comment out realpath, add readlink which doesn't warn
2007-09-04tar: conditionally don't wait for vforked child to exec, as it alwaysDenis Vlasenko
works right on Linux, and anyway mayresult only on less-than-clear error message only, it will not cause tar to misbehave. function old new delta open_transformer 98 80 -18 writeTarFile 714 547 -167 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-185) Total: -185 bytes text data bss dec hex filename 770651 1051 10764 782466 bf082 busybox_old 770463 1051 10764 782278 befc6 busybox_unstripped
2007-08-29vsz and rss are unsigned longs (ulong ~= width of void* =>Denis Vlasenko
suitable for expressing total RAM in system). We account for "32 bit in 64 bit" systems by storing kbytes, not bytes there. Should allow for up to ~2000 Gb RAM on 32 bits.
2007-08-28top: use poll instead of select for waiting on one descriptorDenis Vlasenko
smart_ulltoa5: make it more cryptic. -50 bytes. function old new delta passwd_main 1095 1103 +8 getNum 557 565 +8 buffer_fill_and_print 73 76 +3 udhcpc_main 2393 2395 +2 mkfs_minix_main 3071 3070 -1 dname_enc 377 373 -4 expmeta 480 472 -8 smart_ulltoa5 334 283 -51 top_main 911 815 -96 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/5 up/down: 21/-160) Total: -139 bytes text data bss dec hex filename 770872 1063 10788 782723 bf183 busybox_old 770732 1063 10788 782583 bf0f7 busybox_unstripped
2007-08-26ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)Denis Vlasenko
2007-08-19libbb,crond,lash: fix getopt32 (don't know how it managed to slip through)Denis Vlasenko
*: fcntl(fd, F_GETFL) doesn't require third parameter at all.