aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag '1_26_2' into w32_1_26_2w32_1_26_2Ron Yorston2021-03-246-21/+70
|\
| * Make FEATURE_USERNAME_COMPLETION=y by defaultDenys Vlasenko2017-01-011-1/+1
| | | | | | | | | | | | This matches bash behavior on Fedora Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix breakage found by mass one-applet buildsDenys Vlasenko2017-01-013-16/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: implement -B n<suff> and -B <suff> formats of -B optionDenys Vlasenko2016-12-121-0/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2016-12-101-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * selinux: drop deprecated headersMike Frysinger2016-12-091-1/+12
| | | | | | | | | | | | | | | | | | | | | | The selinux guys want you to get class values at runtime by converting textual names into constants. Drop the deprecated headers and switch to the new format. This API has been around for years, so there shouldn't be an issue with backwards compatibility. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * randomconfig fixesDenys Vlasenko2016-12-081-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix musl problem with dirname, now for all users of bb_make_directory()Denys Vlasenko2016-12-041-2/+13
| | | | | | | | | | | | | | | | | | | | function old new delta bb_make_directory 412 419 +7 install_main 793 769 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-24) Total: -17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-11-294-53/+259
|\|
| * Do not print useless empty line after list of appletsDenys Vlasenko2016-11-281-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: simplify code a bitDenys Vlasenko2016-11-281-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta lineedit_read_key 155 162 +7 put_prompt 51 46 -5 read_line_input 3722 3715 -7 cmdedit_setwidth 81 50 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 7/-43) Total: -36 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: fix two bugs in SIGWINCH signal handlingDenys Vlasenko2016-11-271-29/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) restore entire sigaction, not only signal handler function (2) do not use stdio when not sure WINCH did not interrupt a printf() or such. function old new delta cmdedit_setwidth - 81 +81 read_line_input 3682 3722 +40 lineedit_read_key 138 155 +17 put_prompt 55 51 -4 win_changed 93 47 -46 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/2 up/down: 138/-50) Total: 88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: make ^C in interactive mode visually much closer to bash behaviorDenys Vlasenko2016-11-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move FEATURE_BUFFERS_USE_foo options to library tuningDenys Vlasenko2016-11-241-0/+24
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Move locale, unicode, and "use sendfile?" options to library tuningDenys Vlasenko2016-11-241-0/+138
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: fix handling of repeating Alt-b, Alt-f, Alt-d, Alt-BackspaceRostislav Skudnov2016-11-242-42/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These key combinations should repeat correctly when the keys are pressed and held. Before this change, they do this erratically - many repeats are "eaten" because they are treated as unrecognized ESC seqs: ESC 0x7f is treated by Alt+baskspace, but ESC 0x7f ESC 0x7f ESC 0x7f is unrecognized. Escape sequences corresponding to these key combinations are moved from read_line_input to lineedit_read_key. Also, these key sequences are now enabled regardless of whether FEATURE_EDITING_VI is set, since Vim does not actually support these key combinations, but they are present in readline library. function old new delta static.esccmds 93 103 +10 read_line_input 3737 3687 -50 Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix allnoconfig warningsDenys Vlasenko2016-11-181-8/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-11-103-18/+22
|\|
| * comment and readme updatesDenys Vlasenko2016-11-041-0/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * su: expand help; simplify passing of -c CMD to run_shell()Denys Vlasenko2016-11-032-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Also, added a comment about bug 9401 (TIOCSTI input injection). function old new delta packed_usage 30909 30932 +23 su_main 470 487 +17 sulogin_main 260 258 -2 run_applet_and_exit 681 678 -3 run_shell 166 126 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-11-021-9/+38
|\|
| * man: make width selection more thorough; explain how to override itDenys Vlasenko2016-10-311-9/+38
| | | | | | | | | | | | | | Fedora's "man CMD >file" still uses terminal width, not 80 (but disables formatting), this change mimics that. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-10-261-1/+1
|\|
| * lineedit: fix completion with applet names. closes 9361Denys Vlasenko2016-10-241-1/+1
| | | | | | | | | | | | Patch by Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch busybox (up to "ash: comment out free(p) just before...")Ron Yorston2016-10-1911-73/+238
|\|
| * hush: add commented-out debug printouts in "memleak" built-inDenys Vlasenko2016-10-031-0/+8
| | | | | | | | | | | | | | Allocation addresses of malloc() are jittery, thought I had a mem leak in hush, but it was malloc variability. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make xmalloc_sockaddr2dotted use NI_NUMERICSCOPEDenys Vlasenko2016-09-261-2/+5
| | | | | | | | | | | | | | | | Gives "mount -t cifs //fe80::6a05:caff:fe3e:dbf5%eth0/test test" a chance to work: mount must pass "ip=numeric_IPv6%numeric_iface_id" in the omunt option string. Currently, it does not. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/speed_table.c: expand commentsDenys Vlasenko2016-09-261-1/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fix in commentDenys Vlasenko2016-09-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: handle \S in /etc/issueDenys Vlasenko2016-09-241-0/+40
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb:/send_to_from: do not require that "to" should have the same AF. ↵Denys Vlasenko2016-09-151-2/+8
| | | | | | | | | | | | Closes 9146 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/xwrite: print errno on "short write" errorsDenys Vlasenko2016-09-051-2/+10
| | | | | | | | | | | | | | | | | | Lauri Kasanen: :: Over at TinyCore, we receive a huge number of questions of the type "I :: got "short write", what does it mean?". Mostly for the rpi port and when :: using bb wget. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/speed_table.c: survive B115200 and B230400 not fitting into 16 bitsDenys Vlasenko2016-09-011-11/+55
| | | | | | | | | | | | | | Seen on OSX. While at it, expand baud table with B500000..B4000000 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3: fix to conform to final SHA3 padding standard, add -a BITS optionDenys Vlasenko2016-08-291-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta hash_file 331 396 +65 md5_sha1_sum_main 485 538 +53 packed_usage 30423 30464 +41 sha3_begin 17 31 +14 sha3_hash 101 110 +9 sha3_end 41 49 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hexdump: fix numerous bugs in handling of backslashesDenys Vlasenko2016-08-261-20/+31
| | | | | | | | | | | | | | | | | | Was: t=48\\ t=45\\ t=4c\\ t=4c\\ t=4f\\ t=0a\\ Now: =48=\n =45=\n =4c=\n =4c=\n =4f=\n =0a=\n Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix a bug in FEATURE_SH_STANDALONE=y config. Closes 9186Denys Vlasenko2016-08-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run this in a "sh SCRIPT": sha256sum /dev/null echo END sha256sum is a NOEXEC applet. It runs in a forked child. Then child exit()s. By this time, entire script is read, and buffered in a FILE object from fopen("SCRIPT"). But fgetc() did not consume entire input. exit() lseeks back by -9 bytes, from <eof> to 'e' in 'echo'. (this may be libc-specific). This change of fd position *is shared with the parent*! Now parent can read more, and it thinks there is another "echo END". End result: two "echo END"s are run. Fix this by _exit()ing instead. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: trivial codeshrink for vi-modeNatanael Copa2016-08-141-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce and use BB_isalnum_or_underscore(). function old new delta BB_isalnum_or_underscore - 43 +43 vi_word_motion 162 150 -12 vi_end_motion 163 145 -18 vi_back_motion 198 179 -19 BB_isalnum 39 - -39 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/3 up/down: 43/-88) Total: -45 bytes Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: fix -i for POSIX mode. Closes 9106Denys Vlasenko2016-08-131-4/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: disentangle PREFER_APPLETS from SH_STANDALONE and SH_NOFORKDenys Vlasenko2016-07-221-2/+3
| | | | | | | | | | | | | | | | On user request. I thought enabling/disabling them all together is more consistent. Evidently, some people do want them to be separately selectable. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: make verbose cp show symlink copies tooDenys Vlasenko2016-07-141-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | lineedit: tweak tab completion of commands in standalone shell modeRon Yorston2016-07-081-3/+11
| | | | | | | | | | | | | | | | | | | | When tab-completing commands in standalone shell mode: don't search the list of applet names if the command includes a path separator; since "busybox" doesn't appear in the list of applet names check for it separately.
* | Merge branch 'busybox' into mergeRon Yorston2016-07-076-53/+119
|\|
| * getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko2016-07-062-25/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: fix a few warnings for allnoconfig buildDenys Vlasenko2016-07-051-13/+17
| | | | | | | | | | | | Not that allnoconfig build is useful in any way... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: suppress warning about run_applet_and_exitRon Yorston2016-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | When busybox is configured to contain a single applet an unnecessary declaration of run_applet_and_exit results in a warning. Move the declaration to avoid this. Reported-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixes 2Denys Vlasenko2016-06-191-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: move common code into run_applet_and_exitRon Yorston2016-06-191-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both calls to run_applet_and_exit are followed by the same code to print an error message and return status 127. Remove this duplication and make run_applet_and_exit static. function old new delta run_applet_and_exit 675 667 -8 main 119 92 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-35) Total: -35 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Allow "busybox <applet>" to work when busybox is disabledRon Yorston2016-06-181-0/+4
| | | | | | | | | | | | | | | | | | A recent commit made it possible to disable BusyBox's --install and --list options. However it also stopped "busybox <applet> <params>" from working. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix time parsing of [[CC]YY]MMDDhhmm[.SS]. Closes 8951Natanael Copa2016-05-311-0/+1
| | | | | | | | | | | | | | | | If SS is not given a value, it is assumed to be zero. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Make busybox an optional appletDenys Vlasenko2016-05-311-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If it's disabled, code shrinks by about 900 bytes: function old new delta usr_bin 10 - -10 usr_sbin 11 - -11 install_dir 20 - -20 applet_install_loc 184 - -184 run_applet_and_exit 686 21 -665 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 0/1 up/down: 0/-890) Total: -890 bytes text data bss dec hex filename 911327 493 7336 919156 e0674 busybox_old 909848 493 7336 917677 e00ad busybox_unstripped but busybox executable by itself does not say anything useful: $ busybox busybox: applet not found Based on the patch by Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>