aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * Refactor catv. Move visible() from stty to libbb.Bartosz Golaszewski2013-07-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following TODO: stty's visible() function and catv's guts are identical. Merge them into an appropriate libbb function. Also makes catv behave exactly like coreutils' cat -v e.g. it'll print 'M-^I' instead of 'M- '. function old new delta visible - 70 +70 do_display 431 379 -52 catv_main 306 250 -56 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 70/-108) Total: -38 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking: code shrinkBartosz Golaszewski2013-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta in_ether - 124 +124 hexchar2int 42 - -42 ifconfig_main 1237 1106 -131 ether_input 141 - -141 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 124/-314) Total: -190 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Commonalize typical [b,]k,m suffix structDenys Vlasenko2013-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bkm_suffixes - 32 +32 static.km_suffixes 24 - -24 suffixes 32 - -32 static.bkm 32 - -32 head_tail_suffixes 32 - -32 ------------------------------------------------------------------------------ (add/remove: 2/6 grow/shrink: 0/0 up/down: 72/-160) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko2013-06-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_applet_and_exit 711 714 +3 sendping_tail 239 236 -3 common_ping_main 1798 1770 -28 create_icmp_socket 65 - -65 create_icmp6_socket 65 - -65 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * losetup: assorted fixes. Closes 6314Denys Vlasenko2013-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | "losetup -d" was not complaining that LOOPDEV is missing. "losetup -a" was listing only up to /dev/loop9. "losetup -f" looped forever if llop0 was taken, and never tried anything after /dev/loop9. "-o" with other options (say, -r) had no effect. function old new delta losetup_main 376 419 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: history builtinFlemming Madsen2013-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta show_history - 39 +39 builtin_history - 16 +16 historycmd - 13 +13 bltins1 312 324 +12 builtintab 336 344 +8 popstring 134 140 +6 hush_main 1048 1046 -2 ash_main 1398 1396 -2 size_from_HISTFILESIZE 44 40 -4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes Signed-off-by: Flemming Madsen <busybox@themadsens.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-04-031-1/+2
|\| | | | | | | | | Conflicts: libbb/lineedit.c
| * libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko2013-03-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-03-191-0/+1
|\|
| * move endofname() to libbbDenys Vlasenko2013-02-261-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2013-02-071-2/+9
|\|
| * sha3: code shrinkDenys Vlasenko2013-01-201-2/+2
| | | | | | | | | | | | | | function old new delta sha3_hash 155 101 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace fixes. no code changesDenys Vlasenko2013-01-151-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3sum: new appletLauri Kasanen2013-01-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta KeccakF - 496 +496 KeccakF_RoundConstants - 192 +192 sha3_hash - 171 +171 sha3_end - 40 +40 hash_file 274 299 +25 KeccakF_RotationConstants - 25 +25 KeccakF_PiLane - 25 +25 packed_usage 29213 29232 +19 sha3_begin - 18 +18 KeccakF_Mod5 - 10 +10 applet_names 2445 2453 +8 applet_main 1420 1424 +4 applet_nameofs 710 712 +2 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 9/7 up/down: 1049/-54) Total: ~995 bytes Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-10-101-1/+1
|\|
| * mark get_shell_name FAST_FUNCDenys Vlasenko2012-10-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-09-071-22/+24
|\| | | | | | | | | | | Conflicts: include/libbb.h shell/ash.c
| * *: declare strings with ALIGN1, as appropriateAurelien Jarno2012-07-241-18/+18
| | | | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * su: do not change to home dir unless -lPascal Bellard2012-06-121-0/+1
| | | | | | | | | | Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: ignore chmod errorsNatanael Copa2012-05-281-0/+1
| | | | | | | | | | | | | | | | This makes unzip to FAT filesystems not exit with error. This is similar to how the "normal" unzip works. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-04-291-1/+0
|\|
| * sendmail: use host rather than NIS domain name for HELORon Yorston2012-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to RFC 5321 the argument to HELO "contains the fully-qualified domain name of the SMTP client" or its IP address if no FQDN is available. BusyBox sendmail uses the NIS domain name instead which, in many cases, is likely to be the default "(none)". [vda: yes, I checked my machine and its uts.domainname was indeed "(none)"] Using the host name is more likely to satisfy the intent of the RFC while allowing the otherwise unused safe_getdomainname function to be removed. Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-03-231-28/+44
|\| | | | | | | | | Conflicts: Makefile.flags
| * update seamless uncompression codeDenys Vlasenko2012-03-061-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes "tar tf hello_world.txz" work without adding special-casing for ".txz" extension. It also removes ever-growing magic checking code in rpm2cpio and get_header_tar - we reuse one which lives in setup_unzip_on_fd. function old new delta unpack_gz_stream 7 566 +559 check_signature16 - 70 +70 setup_unzip_on_fd 99 142 +43 handle_SIGCHLD - 41 +41 unpack_bz2_stream 342 376 +34 unzip_main 2352 2385 +33 bbunpack 503 533 +30 open_transformer 74 102 +28 unpack_Z_stream 1278 1304 +26 unpack_gunzip 101 123 +22 init_transformer_aux_data - 18 +18 unpack_xz_stream 2388 2402 +14 open_zipped 131 141 +10 rpm_main 1358 1363 +5 get_header_tar_lzma 52 57 +5 get_header_tar_bz2 52 57 +5 unpack_lzma_stream 2698 2702 +4 hash_find 234 233 -1 get_header_tar 1759 1733 -26 get_header_tar_gz 92 57 -35 unpack_uncompress 51 12 -39 rpm2cpio_main 201 147 -54 unpack_unxz 67 12 -55 unpack_bz2_stream_prime 55 - -55 get_header_tar_Z 86 - -86 unpack_gz_stream_with_info 539 - -539 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890) Total: 57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * preparatory cleanups for seamless uncompression improvementsDenys Vlasenko2012-03-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | unpack_gz_stream_with_info: fix buggy error check man: fix possible accesses past the end of a string move seamless uncompression helpers from read_printf.c to open_transformer.c function old new delta show_manpage 153 212 +59 unpack_gz_stream_with_info 520 539 +19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Make unix (local) sockets work without IPv6 enabledJonh Wendell2012-02-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xsocket_type() function had an optional "family" argument that was enabled only if IPv6 is enabled. In the case of the function was called with a valid AF_UNIX argument, and IPv6 is disabled, this argument was silently ignored. This patch makes the "family" argument mandatory, while keeping the old behavior i.e., if AF_UNSPEC is passed, we try first IPv6 (if it's enabled) and fallback to IPv4. Also I changed all callers of xsocket_type() to reflect its new interface. Signed-off-by: Jonh Wendell <jonh.wendell@vexcorp.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: do not treat non-leading '#' chars as start of comment. Closes 4676Denys Vlasenko2012-01-111-2/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move include <shadow.h> close to pwd.h and grp.h includesDenys Vlasenko2012-01-081-8/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move Adroid endgrent() and endpwent() NOPS to libbb.hDenys Vlasenko2012-01-081-2/+6
| | | | | | | | | | | | They should be after includes of pwd.h and grp.h Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: remove is_directory's argument which is always NULLDenys Vlasenko2011-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta send_cgi_and_exit 892 890 -2 ln_main 447 445 -2 handle_incoming_and_exit 2784 2780 -4 is_directory 66 59 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nommu: fix cases where we mangle argv[0][0]Denys Vlasenko2011-11-221-0/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: add check for bad off_t size detectionDenys Vlasenko2011-11-171-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: tighten up macro codeDenys Vlasenko2011-11-161-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bb_daemonize_or_rexec(): add flag to double-fork; use it in start-stop-daemonPeter Korsgaard2011-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add a DAEMON_DOUBLE_FORK flag to make bb_daemonize double-fork so it isn't a session leader, and hence doesn't get a controlling tty on Linux if a tty is ever opened, similar to how libdaemon's daemon_fork or the big start-stop-daemon does it - And use it in start-stop-daemon. For details, see http://www.win.tue.nl/~aeb/linux/lk/lk-10.html#ss10.3 Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into mergeRon Yorston2012-03-231-44/+70
|\| | | | | | | | | | | Conflicts: Makefile.flags scripts/basic/fixdep.c
| * lineedit: add support for M-b, M-f, M-d, M-BackspaceDenys Vlasenko2011-11-031-17/+29
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta ctrl_left - 96 +96 ctrl_right - 76 +76 static.esccmds 81 93 +12 read_line_input 3876 3885 +9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 193/0) Total: 193 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: split decode_base64 off read_base64Leonid Lisovskiy2011-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | function old new delta decode_base64 - 182 +182 read_base64 378 255 -123 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 182/-123) Total: 59 bytes Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: remove unused definesDenys Vlasenko2011-10-241-7/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: add support for DHCP option 212 (RFC 5969)Denys Vlasenko2011-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch is from OpenWRT people. function old new delta xmalloc_optname_optval 637 874 +237 dhcp_option_strings 237 243 +6 dhcp_optflags 68 70 +2 len_of_option_as_string 12 13 +1 dhcp_option_lengths 12 13 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 247/0) Total: 247 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * add INIT_G()'s. No code changes.Denys Vlasenko2011-09-211-3/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * losetup: implement -r option. Closes 4033.Denys Vlasenko2011-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 28595 28633 +38 losetup_main 285 290 +5 singlemount 906 908 +2 set_loop 674 672 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: URL-decode user:password before base64-encoding it into auth hdr. ↵Denys Vlasenko2011-09-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes 3625. function old new delta percent_decode_in_place - 152 +152 parse_url 304 317 +13 handle_incoming_and_exit 2795 2798 +3 httpd_main 763 760 -3 decodeString 152 - -152 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * stop declariong our own dirname prototypeDenys Vlasenko2011-09-101-6/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking: consolidate the IP checksum code. -129 bytes.Baruch Siach2011-09-071-0/+1
| | | | | | | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: remove SAVE_HISTORY bit, ->hist_file can be used as indicatorDenys Vlasenko2011-09-041-7/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: add support for history saving on exitDenys Vlasenko2011-09-041-0/+9
| | | | | | | | | | | | Based on the patch by Dennis Groenen <tj.groenen@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into mergeRon Yorston2012-03-221-19/+6
|\| | | | | | | | | Conflicts: include/platform.h
| * *: work around sysinfo.h versus linux/*.h problemsDenys Vlasenko2011-07-261-4/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: do not use homegrown struct sysinfo.Denys Vlasenko2011-07-251-19/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into mergeRon Yorston2012-03-221-9/+31
|\| | | | | | | | | Conflicts: procps/ps.c