aboutsummaryrefslogtreecommitdiff
path: root/coreutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * dd: add 'oflag=seek_bytes'Rostislav Skudnov2018-10-301-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow specifying position in the output file in bytes instead of obs-sized blocks, improve compatibility with GNU dd. function old new delta dd_main 1632 1693 +61 packed_usage 33130 33150 +20 static.oflag_words - 12 +12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 93/0) Total: 93 bytes Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * printf: fix printing +-prefixed numbersBernhard Reutner-Fischer2018-10-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Cristian Ionescu-Idbohrn for noticing. Also fix "%d" ' 42' to skip leading whitespace. function old new delta print_direc 435 454 +19 bb_strtoll 99 103 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 23/0) Total: 23 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-10-081-2/+2
|\|
| * unzip: use printable_string() for printing filenamesDenys Vlasenko2018-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2726 2792 +66 printable_string2 - 57 +57 identify 4329 4336 +7 expmeta 659 663 +4 add_interface 99 103 +4 beep_main 286 289 +3 changepath 192 194 +2 builtin_type 115 117 +2 devmem_main 469 470 +1 input_tab 1076 1074 -2 create_J 1821 1819 -2 poplocalvars 314 311 -3 doCommands 2222 2214 -8 do_load 918 902 -16 printable_string 57 9 -48 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 8/6 up/down: 146/-79) Total: 67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-09-104-89/+31
|\|
| * timeout: fix arguments to match coreutilsDenys Vlasenko2018-08-031-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Was: timeout [-t SECS] [-s SIG] PROG ARGS Is: timeout [-s SIG] SECS PROG ARGS function old new delta timeout_main 312 319 +7 packed_usage 32882 32858 -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>
| * extend fractional duration support to "top -d N.N" and "timeout"Denys Vlasenko2018-08-032-75/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta parse_duration_str - 168 +168 sleep_for_duration - 157 +157 top_main 885 928 +43 timeout_main 269 312 +43 handle_input 571 614 +43 duration_suffixes - 40 +40 sfx 40 - -40 sleep_main 364 79 -285 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 3/1 up/down: 494/-325) Total: 169 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: When -h is passed, the total should also be in human unitsLauri Kasanen2018-08-011-1/+9
| | | | | | | | | | Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: placate gcc8Denys Vlasenko2018-08-011-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox'Ron Yorston2018-07-257-34/+93
|\|
| * cp: add missing quote in config snippetDenys Vlasenko2018-07-171-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: optional --reflink supportDenys Vlasenko2018-07-131-0/+24
| | | | | | | | | | | | | | | | function old new delta cp_main 428 512 +84 copy_file 1676 1742 +66 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: add -V "sort version"Denys Vlasenko2018-07-081-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 32855 32858 +3 get_key 500 503 +3 sort_opt_str 36 37 +1 sort_main 1037 1036 -1 compare_keys 795 783 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 7/-13) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nproc: implement --all --ignore=Nharoon maqsood2018-07-061-10/+34
| | | | | | | | | | | | | | | | | | | | | | function old new delta nproc_main 98 242 +144 packed_usage 32799 32816 +17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 161/0) Total: 161 bytes Signed-off-by: haroon maqsood <maqsood3525@live.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * install: fix "-D -t DIR1/DIR2/DIR3" creating only DIR1/DIR2, closes 11106Denys Vlasenko2018-06-221-1/+5
| | | | | | | | | | | | | | function old new delta install_main 758 767 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * restore documentation on the build config languageKartik Agaram2018-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | Kconfig-language.txt was deleted in commit 4fa499a17b52b back in 2006. Move to docs/ as suggested by Xabier Oneca: http://lists.busybox.net/pipermail/busybox/2014-May/080914.html Also update references to it everywhere. Signed-off-by: Kartik Agaram <akkartik@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * realpath,readlink -f: coreutils compat, closes 11021Denys Vlasenko2018-05-242-2/+2
| | | | | | | | | | | | | | function old new delta xmalloc_realpath_coreutils - 121 +121 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2018-05-132-3/+7
|\|
| * cat: fix cat -e and cat -v erroneously numbering 1st lineDenys Vlasenko2018-04-291-3/+3
| | | | | | | | | | | | | | function old new delta cat_main 418 421 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: add comments about [[, no code changesDenys Vlasenko2018-04-101-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ls, stat: don't try to read symlinksRon Yorston2018-04-102-0/+10
| | | | | | | | | | | | | | | | Currently the WIN32 emulation of readlink(2) fails with ENOSYS. This causes ugly error messages in ls and stat. Don't even try calling readlink(2) and skip any code that uses the name it doesn't return.
* | Merge branch 'busybox' into mergeRon Yorston2018-04-094-11/+83
|\|
| * bzip2: fix two crashes on corrupted archivesDenys Vlasenko2018-04-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it turns out, longjmp'ing into freed stack is not healthy... function old new delta unpack_usage_messages - 97 +97 unpack_bz2_stream 369 409 +40 get_next_block 1667 1677 +10 get_bits 156 155 -1 start_bunzip 212 183 -29 bb_show_usage 181 120 -61 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/3 up/down: 147/-91) Total: 56 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb.h: always include sys/resource.hDenys Vlasenko2018-04-081-1/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: rename bb_ask -> bb_ask_noecho, bb_ask_confirmation -> ↵Denys Vlasenko2018-04-071-1/+1
| | | | | | | | | | | | bb_ask_y_confirmation Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: smaller and more agressive FEATURE_SORT_OPTIMIZE_MEMORYDenys Vlasenko2018-04-061-12/+12
| | | | | | | | | | | | | | function old new delta sort_main 1098 1037 -61 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: move misplaced commentDenys Vlasenko2018-04-041-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: FEATURE_SORT_OPTIMIZE_MEMORYDenys Vlasenko2018-04-041-6/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On sorting all kernel/linux/arch/ *.[ch] files, this reduces memory usage by 6%. yes | head -99999999 | sort goes down from 1900Mb to 380 Mb. function old new delta sort_main 862 1098 +236 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | fsync: avoid a gratuitous difference from upstreamRon Yorston2018-04-031-3/+0
| | | | | | | | | | Move the definition of O_NOCTTY to mingw.h so that fsync.c is the same as upstream.
* | Merge branch 'busybox' into mergeRon Yorston2018-04-021-1/+1
|\|
| * stat: fix a typo: s/romfs/ramfs/, closes 10876Denys Vlasenko2018-03-311-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | timeout: futher improvementsRon Yorston2018-03-271-7/+19
| | | | | | | | | | | | | | | | | | When signal 0 is sent to the child process both coreutils and BusyBox timeout allow the child to continue running. busybox-w32 was sending the signal and then killing the child: be consistent. When timeout is interrupted by SIGTERM or Ctrl-C from an interactive shell kill the child too.
* | timeout: return exit code 125 if option parsing failsRon Yorston2018-03-241-1/+4
| |
* | timeout: bring exit status into line with coreutilsRon Yorston2018-03-241-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coreutils documentation says of the exit status: 124 if command times out 125 if timeout itself fails 126 if command is found but cannot be invoked 127 if command cannot be found 137 if command is sent the KILL(9) signal (128+9) the exit status of command otherwise Make busybox-w32 'timeout' behaviour match this. Upstream BusyBox is unaffected. See GitHub issue #105.
* | win32: save a few bytes in device file supportRon Yorston2018-03-231-6/+1
| |
* | win32: restrict visibility of special devicesRon Yorston2018-03-152-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling of the special devices /dev/zero and /dev/urandom was inconsistent: - they could be used as arguments to 'cat' but not 'od'; - they could not be used in shell redirection. Restrict the use of these devices to two places: - as input files to 'dd' with the 'if=' argument; - internally within 'shred'. See GitHub issue #98.
* | Merge branch 'busybox' into mergeRon Yorston2018-03-151-1/+1
|\|
| * md5sum: use config help text similar to other "sum" toolsDenys Vlasenko2018-03-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | dd: mention /dev/zero and /dev/urandom in help messageRon Yorston2018-03-061-0/+3
| |
* | Merge branch 'busybox' into mergeRon Yorston2018-03-013-44/+103
|\|
| * df: do "rootfs" check soonerDenys Vlasenko2018-02-231-4/+5
| | | | | | | | | | | | | | function old new delta df_main 1065 1064 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: 4TB+ support on 32 bits archDenys Vlasenko2018-02-231-8/+15
| | | | | | | | | | | | | | | | | | Reported for Pascal Bellard. function old new delta df_main 1054 1065 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * od: move address_fmt[] from data to globals. 8 less bytes in data sectionDenys Vlasenko2018-02-221-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta od_main 2164 2179 +15 address_fmt 8 - -8 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 15/-8) Total: 7 bytes text data bss dec hex filename 930954 481 6852 938287 e512f busybox_old 930977 473 6852 938302 e513e busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: fix potentially buggy use of OPT_STRDenys Vlasenko2018-02-221-12/+15
| | | | | | | | | | | | | | | | | | | | | | This also makes OPT_STR reused: text data bss dec hex filename 930979 481 6852 938312 e5148 busybox_old 930954 481 6852 938287 e512f busybox_unstripped ^^^^^^ Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: in -s handling, return 1/-1, not 1/0 compare resultDenys Vlasenko2018-02-221-2/+3
| | | | | | | | | | | | | | function old new delta compare_keys 794 795 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: fix -s. Closes 10671Denys Vlasenko2018-02-211-12/+57
| | | | | | | | | | | | | | | | | | | | function old new delta sort_main 786 862 +76 compare_keys 720 794 +74 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 150/0) Total: 150 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Remove fake signal-handling codeRon Yorston2018-03-011-0/+2
| | | | | | | | | | | | | | | | | | Microsoft Windows has only limited support for signals. busybox-w32 initially papered over this fact by adding definitions for unsupported signals and signal-handling functions. Remove this fake code and deal with the consequences by excluding anything that fails to compile as a result.
* | win32: move detection of file formats to stat(2)Ron Yorston2018-02-261-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code to detect shell scripts and binary executables from mingw_access to a separate function, has_exec_format. Call this function in do_lstat to decide whether to set the executable bits in the file mode. This will slow down stat but has a couple of advantages: - shell scripts are highlighted in ls output - the test applet can use stat(2) to detect executable files The new function is used to handle another corner case in spawnveq: binary executables without the usual .exe extension are only run by spawnve if the file name ends with '.'. Two minor changes: - file_is_win32_executable has been renamed add_win32_extension to clarify what it does - a call to file_is_executable has been removed from find_command in ash as it resulted in unhelpful error messages.
* | shred: fix up for WIN32 and enable by defaultRon Yorston2018-02-221-0/+6
| | | | | | | | | | | | | | | | Use the new low-level support for /dev/zero and /dev/urandom to allow shred to work in busybox-w32. The only change required is to close the file before unlinking it, as Microsoft Windows won't delete an open file.
* | dd: use new device handling to implement /dev/zero and /dev/urandomRon Yorston2018-02-221-13/+10
| | | | | | | | | | | | Replace internal support for /dev/zero with the newly introduced device handling in open/read. This reduces the differences between busybox-w32 and upstream.