aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sha3: code shrinkDenys Vlasenko2013-01-201-32/+59
| | | | | | | function old new delta sha3_hash 155 101 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* code shrinkDenys Vlasenko2013-01-171-8/+12
| | | | | | | | function old new delta applet_name_compare 36 31 -5 find_applet_by_name 43 25 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: s/sha3_process_block76/sha3_process_block72/Denys Vlasenko2013-01-161-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: rename KeccakF->sha3_process_block76.Denys Vlasenko2013-01-161-79/+81
| | | | | | | | This brings the naming more in line with other hashes. Pulled most statics and constants into it. Also noticed that two byte arrays are 1 element too big. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: cache ctx->bytes_queuedDenys Vlasenko2013-01-151-11/+11
| | | | | | | function old new delta sha3_hash 171 155 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: remove two "small code" codepaths: I can't reproduce code size win on ↵Denys Vlasenko2013-01-151-43/+18
| | | | | | them anymore Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: tweak choice of a fast code path for 64-bitDenys Vlasenko2013-01-151-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: cosmetic tweaks to various names, comments. No logic changes.Denys Vlasenko2013-01-151-61/+63
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: code shrinkDenys Vlasenko2013-01-151-26/+36
| | | | | | | | function old new delta KeccakF 1053 1078 +25 KeccakF_RoundConstants 192 48 -144 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: code shrinkDenys Vlasenko2013-01-151-13/+18
| | | | | | | function old new delta KeccakF 1064 1053 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3: another speedup for SHA3_SMALL=0 caseDenys Vlasenko2013-01-151-10/+25
| | | | 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>
* sha3: make size/speed optimization decision configurableDenys Vlasenko2013-01-152-19/+68
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanup. no code changesDenys Vlasenko2013-01-144-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sha3sum: new appletLauri Kasanen2013-01-141-0/+194
| | | | | | | | | | | | | | | | | | | | | | 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>
* mark get_shell_name FAST_FUNCDenys Vlasenko2012-10-031-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top/ps: argv0:"gdm-session-worker [pam/gdm-password]" == comm:"gdm-session-wor"Denys Vlasenko2012-10-021-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: in !EDITING config, return -1 on fgets errorDenys Vlasenko2012-09-271-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: correctness/size tweaks in signal-related helpersDenys Vlasenko2012-09-271-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: fix "last CPU" parsingDenys Vlasenko2012-09-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* refactor correct_password.c to avoid one ifwalter harms2012-09-041-6/+3
| | | | | Signed-off-by: walter harms <wharms@bfs.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: fix Alt-D when cursor==0Cliff Frey2012-08-071-3/+3
| | | | | Signed-off-by: Cliff Frey <cliff@meraki.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Simplify copyright/license notice that appears in the binary.Bradley M. Kuhn2012-07-261-3/+3
| | | | | | | | | | | Existing copyright notice for binary would need to be longer to achieve optimal accuracy. This compromise punts to the source for full notices, but does note the years of the copyrights and that there are many authors, all licensing under GPLv2. Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org> Signed-off-by: Tony Sebro <tony@sfconservancy.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* su: do not change to home dir unless -lPascal Bellard2012-06-122-5/+7
| | | | | Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Add comments in keyboard escape sequences tableDenys Vlasenko2012-06-111-5/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: add missing_syscalls.c: for now, only Android syscallsTias Guns2012-06-101-0/+42
| | | | | Signed-off-by: Tias Guns <tias@ulyssis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: ignore chmod errorsNatanael Copa2012-05-281-1/+6
| | | | | | | | 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>
* busybox: tweak help text and copyright yearDenys Vlasenko2012-05-141-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ln: support -T and -vSimon B2012-05-061-1/+1
| | | | | | | | | function old new delta ln_main 445 524 +79 packed_usage 29182 29179 -3 Signed-off-by: Simon B <sburnet@hotmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* get_linux_version_code: don't fail on Linux version strints like "3.0-foo"Andreas Oberritter2012-05-051-7/+4
| | | | | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: use host rather than NIS domain name for HELORon Yorston2012-04-281-22/+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>
* lineedit: histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=yDennis Groenen2012-04-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is set to y, the histfile will get cleared if the total amount of history lines is less than MAX_HISTORY. Only if the histfile is not empty _and_ the amount of lines currently in memory are equal to or greater than MAX_HISTORY, history saving will work as expected with this feature enabled. Output from defconfig + CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y: $ echo "foo" > ~/.ash_history $ ./busybox ash ~/busybox/a $ echo "bar" > /dev/null ~/busybox/a $ exit $ cat ~/.ash_history $ Output with the patch applied and same config as above: $ echo "foo" > ~/.ash_history $ ./busybox ash ~/busybox/b $ echo "bar" > /dev/null ~/busybox/b $ exit $ cat ~/.ash_history foo echo "bar" > /dev/null exit $ Signed-off-by: Dennis Groenen <tj.groenen at gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace fixesDenys Vlasenko2012-04-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix build breakage found by randconfigDenys Vlasenko2012-04-201-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* busybox: tweak help textDenys Vlasenko2012-03-221-3/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make xchroot do a chdir("/") after chrootDenys Vlasenko2012-03-081-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* preparatory cleanups for seamless uncompression improvementsDenys Vlasenko2012-03-061-139/+0
| | | | | | | | | | | | 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>
* libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko2012-02-281-4/+5
| | | | | | This time for real :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko2012-02-281-1/+2
| | | | | | This is needed for parsing /proc data on linux 2.4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make unix (local) sockets work without IPv6 enabledJonh Wendell2012-02-091-7/+9
| | | | | | | | | | | | | | | | | 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>
* tweak comment, no code changesDenys Vlasenko2012-02-021-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find_mount_point: fix find_mount_point for char devicesJavier Viguera2012-01-181-1/+2
| | | | | | | | | | | | | | | | | | | 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>
* shell_builtin_read: set cc[VMIN] to 1; lineedit: don't clear c_cc[VINTR]Denys Vlasenko2012-01-151-6/+9
| | | | | | | | | | | | | 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>
* mdev: do not treat non-leading '#' chars as start of comment. Closes 4676Denys Vlasenko2012-01-111-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/bb_strtonum: always set end ptr, even on error returnDenys Vlasenko2011-12-221-19/+40
| | | | | | | function old new delta handle_errors 69 61 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: remove is_directory's argument which is always NULLDenys Vlasenko2011-12-181-10/+5
| | | | | | | | | | | | 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>
* hexdump: fix hexdump -n1 -ve '8/2 ""' SEGV. Closes 4478Denys Vlasenko2011-11-181-11/+14
| | | | 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-1/+9
| | | | | | | | | | | | 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>
* lineedit: fix build failureDenys Vlasenko2011-11-041-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: add support for M-b, M-f, M-d, M-BackspaceDenys Vlasenko2011-11-032-3/+48
| | | | | | | | | | | | 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>