aboutsummaryrefslogtreecommitdiff
path: root/coreutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * libbb: clarify what bb_mode_string() generatesDenys Vlasenko2021-09-171-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: eliminate a static data array in bb_mode_string()Denys Vlasenko2021-09-173-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_stat 861 869 +8 header_verbose_list_ar 73 77 +4 display_single 975 979 +4 header_verbose_list 237 239 +2 bb_mode_string 124 115 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 18/-9) Total: 9 bytes text data bss dec hex filename 1043136 559 5052 1048747 1000ab busybox_old 1043153 559 5020 1048732 10009c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chmod: correctly report changed modesDenys Vlasenko2021-09-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | Chmod used to incorrectly report as changed even files for which the mode did not change. This was caused by extra bits in the st_mode, that were not present when parsed from passed argument in the form of octal number. Patch by Wolf <wolf@wolfsden.cz>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-09-173-16/+23
|\| | | | | | | Disable FEATURE_TIMEZONE for now.
| * date,touch: allow timezone offsets in datesRon Yorston2021-09-172-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow ISO 8601 style dates to include a timezone offset. Like the '@' format these dates aren't relative to the user's current timezone and shouldn't be subject to DST adjustment. - The implementation uses the strptime() '%z' format specifier. This an extension which may not be available so the use of timezones is a configuration option. - The 'touch' applet has been updated to respect whether DST adjustment is required, matching 'date'. function old new delta parse_datestr 624 730 +106 static.fmt_str 106 136 +30 touch_main 388 392 +4 date_main 818 819 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 141/0) Total: 141 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: "support" -H as an alias of -hDenys Vlasenko2021-09-111-11/+15
| | | | | | | | | | | | | | | | | | | | function old new delta df_main 1065 1068 +3 .rodata 104232 104233 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 4/0) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-09-102-60/+71
|\|
| * basename: implement -a and -s SUFFIXDenys Vlasenko2021-09-091-24/+38
| | | | | | | | | | | | | | | | | | | | | | function old new delta basename_main 145 207 +62 packed_usage 33914 33950 +36 .rodata 104241 104250 +9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 107/0) Total: 107 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: add a TODO, code shrinkDenys Vlasenko2021-09-071-10/+14
| | | | | | | | | | | | | | function old new delta shuf_main 501 500 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: make -i 99999999990-100000000000 work even on 32 bitsDenys Vlasenko2021-09-041-26/+19
| | | | | | | | | | | | | | | | | | | | function old new delta shuf_main 443 501 +58 .rodata 104238 104245 +7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 65/0) Total: 65 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | shuf: silence compiler warningRon Yorston2021-08-301-1/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2021-08-301-27/+49
|\|
| * shuf: in -i RANGE, accept numbers up to width of pointersDenys Vlasenko2021-08-291-10/+28
| | | | | | | | | | | | | | | | function old new delta .rodata 108468 108474 +6 shuf_main 555 542 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: with -i LOW-HIGH, do not allow any argv'sDenys Vlasenko2021-08-231-0/+3
| | | | | | | | | | | | | | function old new delta shuf_main 436 441 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: tweak --help textDenys Vlasenko2021-08-231-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: speed-up when limited output is requestedRon Yorston2021-08-221-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user noted that the following command was slower than they expected: busybox shuf -i "1500000000-$(date +%s)" -n 5 At time of writing the range contains 128 million values. On my system this takes 7.7s whereas 'shuf' from coreutils takes a handful of milliseconds. Optimise BusyBox 'shuf' for cases where -n is specified by stopping shuffling once the required number of lines have been processed. On my system the time for the example is reduced to 0.4s. function old new delta shuf_main 520 540 +20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 20/0) Total: 20 bytes v2: Code shrink. Since outlines <= numlines: - the loop in shuffle_lines() only needs to test the value of outlines; - shuffle_lines() can be called unconditionally. Update timing to allow for the 13 million seconds elapsed since v1. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-08-173-5/+5
|\|
| * dd: tweak --helpDenys Vlasenko2021-08-151-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * touch: fix SEGV if !ENABLE_FEATURE_TOUCH_SUSV3Denys Vlasenko2021-08-151-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: fix build failure with long options disabledRon Yorston2021-08-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When long options were disabled cp failed to compile with: coreutils/cp.c:130:9: error: empty enum is invalid 130 | }; | ^ Rearrange the conditional compilation to suit. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | printf: improved error handlingRon Yorston2021-08-151-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | The printf applet is NOFORK and is used to implement the printf command in ash. It should therefore be careful about handling memory allocation failures. If vasprintf() or realloc() fail the applet now carries on as best it can. This may result in some lost output but at least the shell will survive. Saves 32 bytes.
* | timeout: make child handle staticRon Yorston2021-08-111-1/+1
| |
* | nproc: code shrinkRon Yorston2021-08-101-24/+12
| | | | | | | | | | | | | | | | Avoid duplication of call to getopt(). Simplify WIN32 code. Saves 80 bytes.
* | split: improve performanceRon Yorston2021-08-051-1/+7
| | | | | | | | | | | | | | | | The default buffer size doesn't seem to work very well on Windows. Increasing the buffer to 16K speeds up the splitting of a 1GB file into 100MB chunks by a factor of two. GitHub issue #224.
* | Merge branch 'busybox' into mergeRon Yorston2021-07-241-97/+110
|\|
| * cut: add toybox-compatible options -O OUTSEP, -D, -F LISTRob Landley2021-07-201-97/+110
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta cut_main 884 1201 +317 packed_usage 33823 33885 +62 .rodata 104186 104179 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 379/-7) Total: 372 bytes Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-06-2823-222/+327
|\|
| * ls: revert last change (short name must be allocated)Denys Vlasenko2021-06-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp,mv: fix -t DIR optionRon Yorston2021-06-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the '-t DIR' option is used the loop over the remaining arguments should terminate when a NULL pointer is reached. function old new delta mv_main 585 590 +5 cp_main 492 496 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 9/0) Total: 9 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * uniq: really support -zRon Yorston2021-06-241-1/+1
| | | | | | | | | | | | | | | | Commit 894466cc5 (uniq: support -z) added support for NUL delimited output. Unfortunately nobody told getopt32(). Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nproc: code shrinkDenys Vlasenko2021-06-241-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: code shrinkDenys Vlasenko2021-06-241-1/+1
| | | | | | | | | | | | | | function old new delta scan_and_display_dirs_recur 576 574 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: implement -nDenys Vlasenko2021-06-221-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 103681 103722 +41 packed_usage 33698 33717 +19 copy_file 1678 1696 +18 cp_main 500 492 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 78/-8) Total: 70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crc32: code shrink for !CKSUM configDenys Vlasenko2021-06-221-11/+17
| | | | | | | | | | | | | | function old new delta cksum_main 215 203 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cksum: fix handling of read errorsDenys Vlasenko2021-06-221-3/+7
| | | | | | | | | | | | | | function old new delta cksum_main 377 399 +22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crc32: new appletDenys Vlasenko2021-06-221-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta cksum_main 258 377 +119 .rodata 103672 103681 +9 applet_names 2745 2751 +6 applet_main 1588 1592 +4 packed_usage 33734 33698 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 138/-36) Total: 102 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: implement -t DIRDenys Vlasenko2021-06-211-59/+71
| | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 33713 33734 +21 .rodata 103670 103672 +2 cp_main 506 500 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 23/-6) Total: 17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: preparatory indenting of code block, no code changesDenys Vlasenko2021-06-211-31/+31
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: support -t TYPEDenys Vlasenko2021-06-201-12/+19
| | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 33656 33716 +60 df_main 1029 1065 +36 .rodata 103395 103397 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 98/0) Total: 98 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: POSIXLY_CORRECT sets _default_ scale, -m/-h overrides itDenys Vlasenko2021-06-201-7/+7
| | | | | | | | | | | | | | function old new delta df_main 1034 1029 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shred: with -u, unlink file even if it is zero lengthDenys Vlasenko2021-06-201-5/+5
| | | | | | | | | | | | | | function old new delta shred_main 391 387 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shred: implement -s SIZEDenys Vlasenko2021-06-201-3/+11
| | | | | | | | | | | | | | | | | | | | | | function old new delta shred_main 337 391 +54 .rodata 103393 103395 +2 packed_usage 33666 33656 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 56/-10) Total: 46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * env: implement -0Denys Vlasenko2021-06-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 33590 33618 +28 env_main 187 209 +22 .rodata 103242 103250 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 58/0) Total: 58 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mv: implement -t and -TDenys Vlasenko2021-06-171-24/+50
| | | | | | | | | | | | | | | | | | | | | | function old new delta mv_main 496 585 +89 .rodata 103188 103242 +54 packed_usage 33549 33590 +41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 184/0) Total: 184 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * uniq: support -zDenys Vlasenko2021-06-172-10/+14
| | | | | | | | | | | | | | | | | | | | function old new delta uniq_main 391 427 +36 packed_usage 33570 33549 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-21) Total: 15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * du: support -b "apparent size"Denys Vlasenko2021-06-161-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta du 434 470 +36 packed_usage 33542 33570 +28 print 57 78 +21 du_main 286 302 +16 .rodata 103187 103188 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 102/0) Total: 102 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shuf: simplify check that we have at least one FILEDenys Vlasenko2021-06-151-5/+2
| | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 103190 103194 +4 packed_usage 33541 33537 -4 shred_main 354 337 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 4/-21) Total: -17 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: more --help tweaksDenys Vlasenko2021-06-151-1/+1
| | | | | | | | | | | | | | function old new delta packed_usage 33552 33541 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: --help tweaksDenys Vlasenko2021-06-146-12/+22
| | | | | | | | | | | | | | function old new delta packed_usage 33589 33552 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * base32/64: accept -i "skip bad chars" option (currently in effect ↵Denys Vlasenko2021-06-131-2/+4
| | | | | | | | | | | | | | | | | | unconditionally) function old new delta .rodata 103189 103190 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>