aboutsummaryrefslogtreecommitdiff
path: root/libbb
AgeCommit message (Collapse)Author
2012-03-06preparatory cleanups for seamless uncompression improvementsDenys Vlasenko
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>
2012-02-28libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko
This time for real :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-28libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko
This is needed for parsing /proc data on linux 2.4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09Make unix (local) sockets work without IPv6 enabledJonh Wendell
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>
2012-02-02tweak comment, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-18find_mount_point: fix find_mount_point for char devicesJavier Viguera
This allows to find mount points of 'char' devices such as UBI volumes which otherwise fail for example with 'df' command: / # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 72091984 12360980 56068924 18% / devtmpfs 115236 4 115232 0% /dev tmpfs 28672 32 28640 0% /tmp /dev/ubi0_0 360268 18348 341920 5% /tmp/mnt/userfs / # df /dev/ubi0_0 Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 115236 4 115232 0% /dev Signed-off-by: Javier Viguera <javier.viguera@digi.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15shell_builtin_read: set cc[VMIN] to 1; lineedit: don't clear c_cc[VINTR]Denys Vlasenko
First change fixes "read -n NUM". Apparently poll() won't report data availability if cc[VMIN] > 1 until there are at least cc[VMIN] bytes. function old new delta read_line_input 3885 3877 -8 shell_builtin_read 1097 1087 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-11mdev: do not treat non-leading '#' chars as start of comment. Closes 4676Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-22libbb/bb_strtonum: always set end ptr, even on error returnDenys Vlasenko
function old new delta handle_errors 69 61 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-18libbb: remove is_directory's argument which is always NULLDenys Vlasenko
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>
2011-11-18hexdump: fix hexdump -n1 -ve '8/2 ""' SEGV. Closes 4478Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-09bb_daemonize_or_rexec(): add flag to double-fork; use it in start-stop-daemonPeter Korsgaard
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>
2011-11-04lineedit: fix build failureDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-03lineedit: add support for M-b, M-f, M-d, M-BackspaceDenys Vlasenko
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>
2011-10-28libbb: shrink base64 decoding a bitDenys Vlasenko
function old new delta bb_uuenc_tbl_base64 67 66 -1 decode_base64 182 161 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-28whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-28libbb: split decode_base64 off read_base64Leonid Lisovskiy
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>
2011-10-24libbb.h: remove unused definesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-22getty,login: tighten up handling of ctty, pgrp, and tty attr restoring on ↵Denys Vlasenko
timeout Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22rename archive.h to bb_archive.h. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-13Config: fix wording in help-textBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-09-12losetup: implement -r option. Closes 4033.Denys Vlasenko
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>
2011-09-11wget: URL-decode user:password before base64-encoding it into auth hdr. ↵Denys Vlasenko
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>
2011-09-10regularize options which control size/speed tradeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-08inet_cksum: big-endian fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-07Fix compile breakageDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-07networking: consolidate the IP checksum code. -129 bytes.Baruch Siach
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04lineedit: remove SAVE_HISTORY bit, ->hist_file can be used as indicatorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04lineedit: add support for history saving on exitDenys Vlasenko
Based on the patch by Dennis Groenen <tj.groenen@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04lineedit: fix atomic replace of history file; hush: fix $HISTFILE handlingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28top: fix CPU% for thread display. Closes 4081Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28Fixes for warnings in FreeBSD buildDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28Fixes for FreeBSD buildMatthias Andree
Signed-off-by: Matthias Andree <mandree@freebsd.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13Bump version to 1.19.0, update copyright year in help messageDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-09die_if_bad_username: tighten up a bitDenys Vlasenko
function old new delta die_if_bad_username 77 97 +20 Based on patches from Tito. The changes are: better comments we disallow '@' now - in practice such usernames will be unusable use of the portable filename character set plus '$' don't use isalnum as it allows non-ASCII letters in legacy 8-bit locales (pointed out by Rich Felker) enforce maximum length of LOGIN_NAME_MAX (including NUL) don't allow '$', '.', and '-' as first char don't print the illegal char in error message as if it is a wide char it will be unreadable print the position of the illegal character Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-25less: optionally query terminal size via "ESC [ 6 n". Closes bug 2659.Denys Vlasenko
+7 bytes is not selected, +100 if selected. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-11libbb/lineedit: implement optional Ctrl-R history searchDenys Vlasenko
function old new delta read_line_input 3433 3957 +524 load_string 77 90 +13 input_tab 1086 1069 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 537/-17) Total: 520 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08a few tweaks for bionicDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08platform.h: tweaks for cygwinDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-29platform.c: provide getline implementationTimo Teras
Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20parse_config: use getline. BIG speedup with glibc (~40%).Timo Teras
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>
2011-06-18libbb/read_cmdline: prepend {comm} if different from argv0. Closes 3835.Denys Vlasenko
function old new delta read_cmdline 114 233 +119 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18procps: remove PSSCAN_STAT define, users were using it incorrectlyDenys Vlasenko
Also contains small cleanups ps. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18parse_config: make test applet easier to enable; fix its codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-17libbb: split bb_get_chunk_from_file and bb_get_chunk_with_continuationDenys Vlasenko
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>
2011-06-03appletlib.c: do not use PAGE_SIZE for malloc tweakingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03only compile obscure.c when neededDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775Denys Vlasenko
When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries to include getopt.h which is not available; for example with uClibc when !UCLIBC_HAS_GETOPT_LONG. getopt.h is only required for the _long set of functions. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23find: cater for libc w/o FNM_CASEFOLDDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>