aboutsummaryrefslogtreecommitdiff
path: root/libbb (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * lineedit: don't block when looking for escape sequence in vi-modeRon Yorston2014-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | In vi-mode lineedit tries to detect some escape sequences. After the ESC it reads the next character to check for certain values. This read should have a timeout or a user-entered ESC to switch to command mode doesn't properly handle the next character. Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Changes to allow building with MinGW-w64Ron Yorston2015-01-051-0/+12
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-12-147-37/+95
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * lineedit: don't fall back to simple line input if tty is in raw modeDenys Vlasenko2014-12-101-2/+6
| | | | | | | | | | | | Testcase: shell command input after python ^Z should still work Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use sendfile() to copy data between file descriptorsBartosz Golaszewski2014-11-271-31/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Busybox already uses sendfile in httpd. This patch proposes to use it globally to copy data between file descriptors. It speeds up the copying on slow systems a lot - below are the times needed to copy a 450Mb file with and without this option enabled on a BeagleBone Black: sendfile: user 0m0.000s sys 0m8.170s read/write 4k: user 0m0.470s sys 0m16.300s function old new delta bb_full_fd_action 394 474 +80 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use ARG_MAX for bb_arg_max() only if it's 60k+Denys Vlasenko2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes ARG_MAX is small (like 32k) yet sysconf(_SC_ARG_MAX) is big, and people prefer using the bigger value. OTOH, with sufficiently large ARG_MAX, further wins from sysconf(_SC_ARG_MAX) being bigger are exponentially smaller: you can see 4 times fewer fork+execs when you run find, but when each execed process already takes a thousand parameters it's likely execution time is dominated by what that process does with each parameter. Thus, with this change ARG_MAX is used if it's sufficiently big, otherwise sysconf(_SC_ARG_MAX) is used. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bbunit: fix WANT_TIMING compilationDenys Vlasenko2014-11-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * exit with 127 if appled name wasn't found - it's more POSIXyDenys Vlasenko2014-11-171-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcip: Add environment variable for overriding log functionalityMichel Stam2014-11-042-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_logenv_override - 70 +70 packed_usage 29969 30033 +64 zcip_main 1426 1431 +5 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 139/0) Total: 139 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | lineedit: don't block when looking for escape sequence in vi-modeRon Yorston2014-12-131-1/+1
| | | | | | | | | | | | | | When in vi-mode lineedit tries to detect some escape sequences. After an escape it reads the next character to check for certain values. This read should have a timeout or a user-entered ESC to switch to command mode doesn't properly handle the next character.
* | sh: don't overwrite login environment variables if already setRon Yorston2014-12-111-0/+11
| | | | | | | | | | | | Certain environment variables (HOME, LOGNAME, USER, SHELL) are set during early shell startup to emulate what login/su would do on UNIX. If any of these are already set don't overwrite them.
* | Don't store file details in inode hash tableRon Yorston2014-11-302-6/+2
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-10-066-63/+395
|\|
| * less: move "retry-on-EAGAIN" logic closer to read opsDenys Vlasenko2014-09-221-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes "G" (goto end of input) command work as well as /search_for_nonexistent_string: both will read to EOF now even from somewhat slow input (such as kernel's "git log"). function old new delta ndelay_on 35 43 +8 ndelay_off 35 43 +8 read_lines 695 691 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * false: make "false --help" exit with 1Denys Vlasenko2014-09-181-8/+18
| | | | | | | | | | | | | | function old new delta run_applet_no_and_exit 447 445 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * init: if libc-based Unicode support is on, run setlocale(LC_ALL, "") at startupDenys Vlasenko2014-08-111-2/+1
| | | | | | | | | | | | | | | | It is not clear why we were excluding init from this. The "getpid() != 1" clause was there from the beginning (2001) but not explained. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ftpd: add optional support for authenticationMorten Kvistgaard2014-08-052-29/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta cmdio_get_cmd_and_arg - 237 +237 get_passwd - 97 +97 check_password - 82 +82 ftpd_main 2297 2178 -119 ask_and_check_password_extended 206 84 -122 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/2 up/down: 416/-241) Total: 175 bytes Signed-off-by: Morten Kvistgaard <MK@pch-engineering.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3: tweak comments and indentationDenys Vlasenko2014-07-301-13/+14
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3: code shrink (and speedup for SHA3_SMALL=0)Denys Vlasenko2014-07-301-16/+66
| | | | | | | | | | | | | | function old new delta sha3_process_block72 1454 1359 -95 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3: add 32-bit optimized bit-sliced implementationDenys Vlasenko2014-07-251-14/+242
| | | | | | | | | | | | | | | | It is an interesting trick, but so far I only managed to make it work correctly, not to make it faster and/or smaller. The code is ifdefed out for now. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix bb_ask() to flush input before prompt, not after. Closes 7190Denys Vlasenko2014-07-011-1/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-06-308-12/+174
|\|
| * libbb: fix compile failure if both ARG_MAX and _SC_ARG_MAX are definedDenys Vlasenko2014-06-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unit-tests: implement the unit-testing frameworkBartosz Golaszewski2014-06-223-12/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This set of patches adds a simple unit-testing framework to Busybox unit-tests: add some helper macros for unit-test framework implementation unit-tests: implement the unit-testing framework unit-tests: add basic documentation on writing the unit test cases unit-tests: modify the Makefile 'test' target to run unit-tests too unit-tests: add two example test cases unit-tests: modify the existing strrstr test code to use the unit-test framework Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: use a wrapper around sysconf(_SC_CLK_TCK) to save a few bytesBartosz Golaszewski2014-06-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_sc_clk_tck - 10 +10 timescmd 118 113 -5 print_route 1763 1758 -5 mpstat_main 1288 1283 -5 iostat_main 1947 1942 -5 INET_setroute 879 871 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 10/-28) Total: -18 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: use sysconf(_SC_ARG_MAX) to determine the command-line size limitDenys Vlasenko2014-06-222-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | The find utility uses a hardcoded value of 32 * 1024 as the limit of the command-line length when calling 'find -exec ... {} +'. This results in over 4 times more execve() calls than in coreutils' find. This patch uses the limit defined in system headers. Based on the patch by Bartosz Golaszewski <bartekgola@gmail.com>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Add conditional support for -v / --verboseDenys Vlasenko2014-05-193-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FEATURE_VERBOSE off, practically no size change. With it on: function old new delta remove_file 493 556 +63 install_main 719 765 +46 bb_make_directory 383 419 +36 rmdir_main 162 191 +29 copy_file 1516 1544 +28 mv_main 502 525 +23 cmp_main 677 693 +16 bbconfig_config_bz2 5264 5279 +15 mkdir_main 158 168 +10 install_longopts 66 76 +10 rm_main 167 175 +8 nexpr 840 846 +6 scan_tree 275 280 +5 fsck_main 1807 1811 +4 ed_main 2541 2545 +4 expand_one_var 1574 1575 +1 swap_on_off_main 420 418 -2 parse_command 1443 1440 -3 redirect 1279 1274 -5 do_load 946 918 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes Based on the patch by Igor Živković. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | MinGW: rename execable -> executableRon Yorston2014-05-061-1/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-05-068-40/+102
|\| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * libbb: rename execable -> executable. No code changesDenys Vlasenko2014-05-022-7/+7
| | | | | | | | | | | | English speakers complained that it sounded awfully broken. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix empty PATH components handlingDenys Vlasenko2014-05-021-12/+18
| | | | | | | | | | | | | | | | function old new delta find_execable 81 86 +5 exists_execable 71 66 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix thinko in rtc_xopen()Denys Vlasenko2014-05-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make rtc_xopen try harder on EBUSYDenys Vlasenko2014-05-021-10/+42
| | | | | | | | | | | | | | function old new delta rtc_xopen 77 139 +62 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix compile failuresDenys Vlasenko2014-05-021-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make syslog level for bb_error_msg's configurable. use it in crondDenys Vlasenko2014-04-301-1/+2
| | | | | | | | | | | | | | | | | | function old new delta bb_verror_msg 380 386 +6 syslog_level - 1 +1 crondlog 165 108 -57 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/obscure.c: code shrink. Suggested by Tito.Denys Vlasenko2014-04-161-1/+1
| | | | | | | | | | | | | | function old new delta string_checker 97 92 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: provide usleep() fallback implementationBernhard Reutner-Fischer2014-04-131-0/+18
| | | | | | | | | | | | | | | | POSIX.1-2008 removed the usleep function, provide a fallback implementaion using the recommended nanosleep(). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix a bad check for uclibc >= 0.9.31Denys Vlasenko2014-03-161-4/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * script: make it work even if fd 0 is closedDenys Vlasenko2014-03-161-1/+1
| | | | | | | | | | | | | | Testcase: script -q -c "echo hey" /dev/null 0>&- Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Move handling of Windows globbing out of upstream codeRon Yorston2014-04-211-5/+0
| |
* | lineedit: improve appearance of forward cursor movementRon Yorston2014-04-091-0/+40
| |
* | Use ANSI escape to move cursor back during line editingRon Yorston2014-04-071-0/+2
| | | | | | | | | | | | BusyBox attempts to optimise for slow terminals by using backspace for small movements. In the Windows console this results in the cursor becoming invisible during backward movement.
* | Provide fake getpwent_r to reduce changes from upstreamRon Yorston2014-03-231-4/+0
| |
* | Alter help message if configured with standalone shellRon Yorston2014-03-231-0/+9
| |
* | Remove unnecessary differences from upstream BusyBoxRon Yorston2014-03-231-1/+1
| |
* | ps: exclude more unused codeRon Yorston2014-03-231-2/+2
| |
* | Add empty sys/syscall.hRon Yorston2014-03-201-1/+1
| |
* | Drop CONFIG_WIN32_NET settingRon Yorston2014-03-171-1/+3
| |
* | Improved support for characters above 0x7fRon Yorston2014-03-171-1/+1
| |
* | Convert argv[0] to lowercase before checking for '.exe'Ron Yorston2014-03-171-5/+8
| |