Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-07sleep: Update docPetr Vorel
4c20d9f2b removed FEATURE_FLOAT_SLEEP option, thus since then there are only two variants. Fixes: 4c20d9f2b ("extend fractional duration support to "top -d N.N" and "timeout"") Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-10-02install: Fix chown resetting suid/sgid bits from chmodNero
Since Linux 2.2.13, chown(2) resets the suid/gid bits for all users. This patch changes the ordering so that chmod gets called after chown. This behavior follows GNU coreutils. Signed-off-by: Nero <nero@w1r3.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-10-02sleep: fix "sleep -- ARGS"Denys Vlasenko
function old new delta sleep_main 116 119 +3 printf_main 860 837 -23 single_argv 50 25 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-48) Total: -45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-08-31tsort: avoid use-after-freeRon Yorston
When the input data contained a cycle it was possible for tsort to attempt to access freed nodes. This sometimes resulted in the test case 'echo a b b a | tsort' crashing. Don't free nodes when they're removed from the graph. function old new delta tsort_main 621 596 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25) Total: -25 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-07-17introduce and use exitcode_tDenys Vlasenko
function old new delta strings_main 422 420 -2 setfattr_main 175 173 -2 brctl_main 1548 1546 -2 makedevs_main 979 975 -4 rev_main 337 332 -5 getfattr_main 307 302 -5 cut_main 1201 1196 -5 cksum_main 398 393 -5 umount_main 573 565 -8 ln_main 516 508 -8 expand_main 660 652 -8 df_main 1068 1060 -8 renice_main 346 332 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/13 up/down: 0/-76) Total: -76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-07-10Update applet size estimatesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26od: -l,I,L indeed depend on sizeof(long), fix thisDenys Vlasenko
function old new delta .rodata 105255 105252 -3 od_main 1917 1901 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-19) Total: -19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26od: actually remove -IL from --help, as comment saysDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26od: support -DOHXILDenys Vlasenko
function old new delta od_main 1866 1917 +51 .rodata 105306 105321 +15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 66/0) Total: 66 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26libbb/dump: conditionalize code used only by xxd and odDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26od: fix default format, shrinkDenys Vlasenko
function old new delta od_main 556 568 +12 .rodata 104613 104555 -58 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 12/-58) Total: -46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-26od: stop printing extra trailing spacesDenys Vlasenko
function old new delta .rodata 104598 104613 +15 display 1475 1485 +10 od_main 549 556 +7 rewrite 971 967 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 32/-4) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-25od: implement -BDenys Vlasenko
function old new delta .rodata 105305 105306 +1 od_main 1880 1866 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 1/-14) Total: -13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-25od: correct -i, enable tests which pass for DESKTOP tooDenys Vlasenko
function old new delta .rodata 105302 105305 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-25od: for !DESKTOP, match output more closely to GNU coreutils 9.1, implement -sDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-25od: fix -ODavid Leonard
od with option -O (4-byte octal) was incorrectly displaying 2-byte decimal when built without CONFIG_DESKTOP Signed-off-by: David Leonard <d+busybox@adaptive-enterprises.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-05-07readlink: code shrinkDenys Vlasenko
function old new delta readlink_main 111 103 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-23factor: we can pack 21, not 20, 3-bit elements into packed wheel wordsDenys Vlasenko
function old new delta packed_wheel 192 184 -8 factor_main 171 163 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-16) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-16readlink: support --, -n alwaysEric Blake
POSIX will be standardizing readlink (just the -n option) and realpath (just -E and -e options): https://www.austingroupbugs.net/view.php?id=1457 Change things for readlink so that the POSIX-mandated -n and -- work even when disabling the non-standard (and partially non-working) -f when FEATURE_READLINK_FOLLOW is clear. POSIX also wants readlink to be verbose by default (if the argument is not a symlink, readlink must output a diagnostic); I did NOT address that one, because I'm waiting to see what the GNU Coreutils folks do: https://lists.gnu.org/archive/html/bug-coreutils/2023-03/msg00035.html Partial fix for https://bugs.busybox.net/show_bug.cgi?id=15466 function old new delta packed_usage 34538 34557 +19 Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-16tr: display usage for incorrect argumentsRon Yorston
tr must have one or two non-option arguments. Display the usage message if any other number is present. function old new delta .rodata 108389 108392 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 3/0) Total: 3 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-13shuf: another tweak to COMMON_PREFIX_HACK codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-12shuf: fix pfx_len calculationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-12shuf: remove redundant codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-12shuf: add (disabled) code to support very long numbers in -i LO-HIDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-12sleep: fix error exit when called as "sh" builtinDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-11seq: fix yet another case of negative parameters not workingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-10seq: accept negative parametersDenys Vlasenko
function old new delta seq_main 429 476 +47 packed_usage 34557 34538 -19 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 47/-19) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-03ash: sleep builtin with no arguments should not exitDenys Vlasenko
function old new delta sleep_main 116 143 +27 .rodata 105245 105268 +23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 50/0) Total: 50 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-04-03hush: printf builtin with no arguments should not exitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2023-01-02mv: fix error in !VERBOSE configsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-11-29Fix non-Linux buildsSamuel Thibault
Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-08-30*: style fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-08-27ash: optional sleep builtinShawn Landden
function old new delta sleepcmd - 10 +10 builtintab 352 360 +8 .rodata 105264 105271 +7 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes Signed-off-by: Shawn Landden <shawnlandden@tutanota.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-07-29sort: fix sort -s -u, closes 14871Denys Vlasenko
function old new delta sort_main 851 856 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-07-29sort: fix -k2M (wasn't skipping leading whitespace)Denys Vlasenko
function old new delta compare_keys 848 862 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-07-11shaNNNsum: accept one-space "HASH FILENAME" format for -c, closes 14866Denys Vlasenko
function old new delta md5_sha1_sum_main 496 501 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-05-02tsort: new appletDavid Leonard
function old new delta tsort_main - 578 +578 .rodata 104884 104906 +22 applet_names 2759 2765 +6 applet_main 1596 1600 +4 packed_usage 34290 34288 -2 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 610/-2) Total: 608 bytes Signed-off-by: David Leonard <d+busybox@adaptive-enterprises.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-02-06*: slap on a few ALIGN_PTR where appropriateDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-02-06*: slap on a few ALIGN* where appropriateDenys Vlasenko
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" function old new delta .rodata 108586 108460 -126 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-126) Total: -126 bytes text data bss dec hex filename 970412 4219 1848 976479 ee65f busybox_old 970286 4219 1848 976353 ee5e1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-18libbb: shrink lineedit_read_key()Denys Vlasenko
function old new delta lineedit_read_key 237 231 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-09ls: implement ls -sh (human-readable allocated blocks)Denys Vlasenko
function old new delta display_single 979 1018 +39 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-08XXXsum: handle binary sums with " " in the pathEmanuele Giacomelli
If a line specifies a binary checksum whose path contains two adjacent spaces, when checking digests with -c the two spaces will be used as the separator between the digest and the pathname instead of " *", as shown: $ echo foo > "/tmp/two spaces" $ md5sum -b "/tmp/two spaces" # This is GNU md5sum d3b07384d113edec49eaa6238ad5ff00 */tmp/two spaces $ md5sum -b "/tmp/two spaces" | ./busybox md5sum -c md5sum: can't open 'spaces': No such file or directory spaces: FAILED md5sum: WARNING: 1 of 1 computed checksums did NOT match function old new delta md5_sha1_sum_main 503 496 -7 Signed-off-by: Emanuele Giacomelli <emanuele.giacomelli@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-05sort: support -hDenys Vlasenko
function old new delta static.scale_suffix - 62 +62 .rodata 104304 104336 +32 compare_keys 820 848 +28 packed_usage 34159 34184 +25 static.suffix - 9 +9 sort_opt_str 37 38 +1 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/0 up/down: 157/0) Total: 157 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-05sort: fix -s -r interaction: 'stable' order is not affected by -rDenys Vlasenko
function old new delta compare_keys 818 820 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-05libbb: factor out fflush_stdout_and_exit(EXIT_SUCCESS)Denys Vlasenko
function old new delta fflush_stdout_and_exit_SUCCESS - 7 +7 xxd_main 890 888 -2 vlock_main 353 351 -2 uuencode_main 318 316 -2 uniq_main 427 425 -2 uname_main 250 248 -2 sort_main 853 851 -2 shuf_main 500 498 -2 route_main 238 236 -2 readlink_main 113 111 -2 nice_main 156 154 -2 last_main 957 955 -2 ipcs_main 960 958 -2 env_main 209 207 -2 chrt_main 464 462 -2 cal_main 921 919 -2 baseNUM_main 650 648 -2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 7/-32) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-01-04md5/shaXsum: use FEATURE_COPYBUF_KB to size the buffer instead of fixed 4kDenys Vlasenko
function old new delta md5_sha1_sum_main 536 565 +29 hash_file 419 401 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-18) Total: 11 bytes In my test, for unrolled sha1, COPYBUF_KB=64 increases throughput from 367 MB/s to 457 MB/s. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-29echo: add FIXME commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-18timeout: add support for "timeout -k KILL_SECS"Matthew Slowe
function old new delta timeout_main 307 373 +66 timeout_wait - 42 +42 .rodata 104201 104203 +2 packed_usage 34097 34096 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 110/-1) Total: 109 bytes Signed-off-by: Matthew Slowe <foo@mafoo.org.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-17printf: allow 0 as a flag and allow multiple flagsRon Yorston
The '%' character in a format specification may be followed by one or more flags from the list "+- #0". BusyBox printf didn't support the '0' flag or allow multiple flags to be provided. As a result the formats '%0*d' and '%0 d' were considered to be invalid. The lack of support for '0' was pointed out by Andrew Snyder on the musl mailing list: https://www.openwall.com/lists/musl/2021/12/14/2 function old new delta printf_main 860 891 +31 .rodata 99281 99282 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 32/0) Total: 32 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-12uudecode: special-case "/dev/stdout", closes 14241Denys Vlasenko
function old new delta uudecode_main 295 322 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>