aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Use the _unlocked stdio macros only when they're all availableDan Fandrich2011-06-301-16/+20
| | | | | | | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: tweak _unlocked hackDenys Vlasenko2011-06-301-36/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use _unlocked variants of stdio I/O.Denys Vlasenko2011-06-201-0/+38
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * parse_config: use getline. BIG speedup with glibc (~40%).Timo Teras2011-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta config_read 559 604 +45 getline - 23 +23 config_close 29 49 +20 find_pair 169 187 +18 showmode 330 338 +8 hash_find 233 234 +1 builtin_umask 133 132 -1 lzo1x_optimize 1434 1429 -5 test_main 253 247 -6 buffer_fill_and_print 196 179 -17 create_J 1849 1826 -23 config_free_data 37 - -37 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 5/5 up/down: 138/-89) Total: 26 bytes Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * procps: remove PSSCAN_STAT define, users were using it incorrectlyDenys Vlasenko2011-06-181-7/+0
| | | | | | | | | | | | Also contains small cleanups ps. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: split bb_get_chunk_from_file and bb_get_chunk_with_continuationDenys Vlasenko2011-06-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also moves bb_get_chunk_with_continuation into its sole user, parse_config.c. This allows to optimize both functions separately, they need to be optimized for speed. (this need was highlighted by slow modprobe caused in part by slow bb_get_chunk_with_continuation in config parser). function old new delta bb_get_chunk_from_file 7 130 +123 config_read 457 558 +101 bb_get_chunk_with_continuation 194 - -194 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 2/0 up/down: 224/-194) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '56a3b82e9692a25ef9c9269e88feac0d579ce8e8' into mergeRon Yorston2012-03-221-10/+28
|\| | | | | | | | | | | | | Conflicts: coreutils/ls.c include/platform.h libbb/bb_basename.c
| * libbb.h: small reorderingDenys Vlasenko2011-05-231-5/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * main: free suid_config list after useDenys Vlasenko2011-05-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_applet_no_and_exit 438 450 +12 ifupdown_main 2147 2149 +2 writeFileToTarball 1325 1326 +1 pidof_main 244 245 +1 last_main 896 897 +1 grep_main 779 780 +1 find_list_entry2 121 122 +1 tar_main 835 833 -2 llist_unlink 28 26 -2 llist_rev 23 21 -2 main 791 782 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/4 up/down: 19/-15) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * adduser: safe username passing to passwd/addgroupDenys Vlasenko2011-05-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passwd: support creating SHA passwords random code shrink function old new delta crypt_make_pw_salt - 87 +87 adduser_main 883 904 +21 ... crypt_make_salt 99 89 -10 chpasswd_main 329 312 -17 packed_usage 28731 28691 -40 passwd_main 1070 1000 -70 cryptpw_main 310 224 -86 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288) Total: -134 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibcDenys Vlasenko2011-05-121-0/+6
| | | | | | | | | | | | | | | | text data bss dec hex filename 875879 493 7584 883956 d7cf4 busybox_old 875879 493 7584 883956 d7cf4 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: make read builtin interruptible.Denys Vlasenko2011-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta builtin_read 185 471 +286 check_and_run_traps 200 262 +62 nonblock_immune_read 73 119 +46 sigismember - 44 +44 record_signal - 21 +21 sigisemptyset - 16 +16 ... ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46) Total: 437 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of ↵Denys Vlasenko2011-05-081-2/+2
| | | | | | | | | | | | xmalloc_reads Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'b83c9704128dd106071184e4b00335a3b8486857' into mergeRon Yorston2012-03-221-2/+4
|\|
| * libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.Denys Vlasenko2011-04-071-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: optional support for $HISTFILESIZE.Denys Vlasenko2011-03-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com) function old new delta size_from_HISTFILESIZE - 44 +44 hush_main 998 1025 +27 ash_main 1348 1374 +26 read_line_input 3361 3372 +11 new_line_input_t 17 24 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '19311bfa7b8e8c6effa9c375de9b0eb4338bee12' into mergeRon Yorston2012-03-221-4/+11
|\| | | | | | | | | | | Conflicts: coreutils/ls.c shell/ash.c
| * use user's shell instead of hardwired "/bin/sh" (android needs this)Denys Vlasenko2011-03-081-1/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make user/group name cache strings longer (~27 chars)Denys Vlasenko2011-03-011-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'da4441c44f6efccb6f7b7588404d9c6bfb7b6af8' into mergeRon Yorston2012-03-221-27/+30
|\| | | | | | | | | | | | | Conflicts: libbb/vfork_daemon_rexec.c networking/wget.c procps/ps.c
| * progress meter: fix bugs found in stall detection and unknown size logicDenys Vlasenko2011-02-111-2/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * progress meter: move file name to bb_progress_t. +20 bytesDenys Vlasenko2011-02-111-3/+9
| | | | | | | | | | | | We were doing expensive unicode conversion on every update Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>