aboutsummaryrefslogtreecommitdiff
path: root/libbb
AgeCommit message (Collapse)Author
2013-03-27hexdump: don't unconditionally limit the usable address rangeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-12readlink: uClibc supports automatic allocation too nowMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-28make --help return exitcode 0. Closes 5612Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-27lineedit: initialize delptrShawn J. Goff
In vi mode, the 'p' and 'P' commands caused a segfault when nothing had been put in the buffer yet because the delptr was not initialized. Signed-off-by: Shawn J. Goff <shawn7400@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26move endofname() to libbbDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-10vasprintf: return -1 on strdup failureDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-07vasprintf: do not use xmalloc, it will deadlock on OOMDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20sha3: code shrinkDenys Vlasenko
function old new delta sha3_hash 155 101 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17code shrinkDenys Vlasenko
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>
2013-01-16sha3: s/sha3_process_block76/sha3_process_block72/Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-16sha3: rename KeccakF->sha3_process_block76.Denys Vlasenko
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>
2013-01-15sha3: cache ctx->bytes_queuedDenys Vlasenko
function old new delta sha3_hash 171 155 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: remove two "small code" codepaths: I can't reproduce code size win on ↵Denys Vlasenko
them anymore Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: tweak choice of a fast code path for 64-bitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: cosmetic tweaks to various names, comments. No logic changes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: code shrinkDenys Vlasenko
function old new delta KeccakF 1053 1078 +25 KeccakF_RoundConstants 192 48 -144 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: code shrinkDenys Vlasenko
function old new delta KeccakF 1064 1053 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: another speedup for SHA3_SMALL=0 caseDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15whitespace fixes. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15sha3: make size/speed optimization decision configurableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14whitespace cleanup. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14sha3sum: new appletLauri Kasanen
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>
2012-10-03mark get_shell_name FAST_FUNCDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-10-02top/ps: argv0:"gdm-session-worker [pam/gdm-password]" == comm:"gdm-session-wor"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27lineedit: in !EDITING config, return -1 on fgets errorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27libbb: correctness/size tweaks in signal-related helpersDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-06top: fix "last CPU" parsingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-04refactor correct_password.c to avoid one ifwalter harms
Signed-off-by: walter harms <wharms@bfs.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-08-07lineedit: fix Alt-D when cursor==0Cliff Frey
Signed-off-by: Cliff Frey <cliff@meraki.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-26Simplify copyright/license notice that appears in the binary.Bradley M. Kuhn
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>
2012-06-12su: do not change to home dir unless -lPascal Bellard
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-11Add comments in keyboard escape sequences tableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-10libbb: add missing_syscalls.c: for now, only Android syscallsTias Guns
Signed-off-by: Tias Guns <tias@ulyssis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-28unzip: ignore chmod errorsNatanael Copa
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>
2012-05-14busybox: tweak help text and copyright yearDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-06ln: support -T and -vSimon B
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>
2012-05-05get_linux_version_code: don't fail on Linux version strints like "3.0-foo"Andreas Oberritter
Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28sendmail: use host rather than NIS domain name for HELORon Yorston
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>
2012-04-26lineedit: histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=yDennis Groenen
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>
2012-04-20whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-20fix build breakage found by randconfigDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-22busybox: tweak help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08libbb: make xchroot do a chdir("/") after chrootDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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>