aboutsummaryrefslogtreecommitdiff
path: root/coreutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* | fsync: enable in default configurationRon Yorston2018-02-221-0/+3
| |
* | du: use Windows-compatible print formatsRon Yorston2018-02-131-1/+1
| | | | | | | | | | | | | | | | Commit 18afed0f9 replaced %ll* formats with Windows equivalents to silence compiler warnings. Some format strings in du were missed because they weren't compiled or weren't string literals. These fixes make 'du -h' work as expected on Windows XP.
* | Merge branch 'busybox' into mergeRon Yorston2018-02-1312-92/+138
|\|
| * cp: fix option handling in non-longopt configDenys Vlasenko2018-02-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | the patch getopt32: remove opt_complementary 22542eca18e5807b72ddc78999f5101e33f17a53 introduced a regressed in the cp command since it removed all aliases of arguments if long_opts is not configured. Patch by Sebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cksum: code shrinkDenys Vlasenko2018-02-011-23/+24
| | | | | | | | | | | | | | function old new delta cksum_main 281 262 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: implement -TAaro Koskinen2018-02-011-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement "cp -T". Some Linux kernel Makefiles started using this recently, so allow also building on systems using busybox cp. function old new delta cp_main 360 428 +68 copy_file 1678 1676 -2 packed_usage 32290 32259 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 76/-39) Total: 35 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dd: add 'fullblock' iflagNicholas Clark2018-01-251-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a fullblock iflag for improved compatibility with GNU dd. The new iflag can be used to ensure that dd calls retrieve the expected amount of data when reading from pipes or unusual filesystems. function old new delta packed_usage 32249 32334 +85 dd_main 1582 1632 +50 static.iflag_words 12 22 +10 ------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 145/0) Total: 145 bytes Signed-off-by: Nicholas Clark <nicholas.clark@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * od_bloaty: fix debug codeDenys Vlasenko2018-01-231-3/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mv: make it NOEXECDenys Vlasenko2018-01-142-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dd: fixed partial count logicDenys Vlasenko2018-01-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | $ busybox dd if=/dev/zero of=/dev/loop0 bs=100M count=8; echo $? 8+0 records in 7+0 records out <=========== FIXED, was 7+1 805220352 bytes (767.9MB) copied, 0.464010 seconds, 1.6GB/s 1 function old new delta write_and_stats 97 99 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dd: exit with 1 if last write was incompleteDenys Vlasenko2018-01-101-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | $ busybox dd if=/dev/zero of=/dev/loop0 bs=100M count=8; echo $? 8+0 records in 7+1 records out 805220352 bytes (767.9MB) copied, 0.464010 seconds, 1.6GB/s 1 <=========== FIXED function old new delta write_and_stats 96 97 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mknod: better --help, much clearer codeDenys Vlasenko2018-01-081-28/+28
| | | | | | | | | | | | | | | | function old new delta packed_usage 32066 32091 +25 mknod_main 173 174 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nice: code shrinkDenys Vlasenko2018-01-081-9/+12
| | | | | | | | | | | | | | function old new delta nice_main 157 152 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chown: fix a mistake in opt_complementary changeDenys Vlasenko2017-12-311-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2017-12-314-10/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * env: -u option fails due to typoRon Yorston2017-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | The -u option is supposed to be allowed to appear multiple times; the option string supplied to getopt32long requires it to be followed by a nonnegative integer. Reported-by: Keith Maxwell <keith.maxwell@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | env: fix typo in option stringRon Yorston2017-12-091-1/+1
| | | | | | | | | | | | | | | | | | The -u option is supposed to be allowed to appear multiple times; the option string supplied to getopt32long requires it to be followed by a nonnegative integer. Reported-by: Keith Maxwell <keith.maxwell@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-11-0318-93/+87
|\|
| * df: Use statvfs instead of non-standard statfsJames Clarke2017-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | Platforms differ on what their implementations of statfs include. Importantly, FreeBSD's does not include a f_frsize member inside struct statfs. However, statvfs is specified by POSIX and includes everything we need, so we can just use that instead. Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-0514-19/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-055-67/+65
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * date: maybe_set_utc only onceDenys Vlasenko2017-10-051-4/+3
| | | | | | | | | | | | | | | | | | | | It's not clear at all why we do it twice. git archaeology did not help. function old new delta date_main 836 839 +3 maybe_set_utc 16 - -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-09-274-9/+28
|\|
| * regularize format of source file headers, no code changesDenys Vlasenko2017-09-182-3/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>