aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-13top: support Enter as a synonym for Space.Elliott Hughes
Both refresh the display in the traditional implementation.
2019-02-13top: use human_readable for the header lines too.Elliott Hughes
Even phones have enough RAM these days that KiB is not a reasonable unit. Traditional top always uses MiB instead of always using KiB, but we may as well just let human_readable pick a unit (that way if KiB is reasonable on your box, that's what you'll get). Before: Tasks: 967 total, 1 running, 581 sleeping, 0 stopped, 0 zombie Mem: 196734820k total,183891564k used, 12843256k free, 5805008k buffers Swap:199888892k total, 719104k used,199169788k free,130367280k cached After: Tasks: 965 total, 2 running, 577 sleeping, 0 stopped, 0 zombie Mem: 188G total, 175G used, 13G free, 5.5G buffers Swap: 191G total, 702M used, 190G free, 124G cached
2019-02-13top: hide the cursor in interactive mode.Elliott Hughes
Matches traditional top.
2019-02-13Oops, missed one.Rob Landley
2019-02-13Use xrecvwait() in ping, and move signal handler setup to start of ping loop.Rob Landley
2019-02-13Move nanomove(), nanodiff(), union socksaddr, and xrecvwait() to lib.Rob Landley
2019-02-13find: fix -path/-ipath and add -wholename/-iwholename synonyms.Elliott Hughes
Plus new tests.
2019-02-13date: more test cleanup.Elliott Hughes
Add the SKIP_HOST=1 for the POSIX inputs to -d that coreutils doesn't support. Fix some comments now Rob's pointed out that the "weird" format was just POSIX with implicit CCYY or CC. (I was confused because coreutils rejects them [as it rejects all POSIX input to -d], but busybox does accept them, but interprets them differently, as explained in the test comments.) Also rename the tests to make it clearer that these are all POSIX format.
2019-02-13sed: fix endless loop in "b loop" test.Elliott Hughes
Very few places actually check for errors from emit, and I actually see the same endless loop from "sed (GNU sed) 4.4" on current Debian, so I'm not sure this isn't Broken As Designed, but an endless loop spewing "short write" (or saying nothing, in the case of GNU sed) really doesn't feel like useful behavior in face of EPIPE, which really isn't going to fix itself. Certainly not being able to run the sed tests to completion is pretty annoying --- which is why, unless we remove this test as invalid, we should probably also add a SKIP_HOST=1 to the "b loop" test. Note that even with this fix you'll see the error twice: sed: short write: Broken pipe sed: short write: Broken pipe Once from the first = command to fail, and then another from the !FLAG(n) flush of the pattern space.
2019-02-12sed: fix substitution of empty capturing groups.Elliott Hughes
The test for \N where N was larger than the number of capturing groups in the regular expression was incorrect, and firing for cases such as matching __(ARM_)?NR_([a-z]*) against __NR_read, where the first group is empty (because it failed to match) but the second group did match "read". Use regex_t's re_nsub for the error check, and treat rm_so == -1 as a signal to just copy nothing into the result. (Found trying to build minijail in AOSP.)
2019-02-11date: some fixes.Elliott Hughes
Add support for more input formats, primarily the ISO formats used by the AOSP build. I've improved/added to the tests a bit to cover these changes, and to explain the reasons for the various remaining test failures (none of which are regressions caused by this patch).
2019-02-11Inline more functions only called once, unwrap wrappers, etc.Rob Landley
2019-02-11Add SPDX identifier, and link to a wikipedia page.Rob Landley
2019-02-10Remove unnecessary macros and typedefs, multipliation by sizeof(char), etc.Rob Landley
2019-02-10Inline more macros only used once, replace BcId with struct str_len from lib,Rob Landley
remove more unnecessary typecasts.
2019-02-09Remove more unnecessary macros. Inline bc_parse_exprs[] with the bit orderRob Landley
reversed so the mask is 1<<(x&7) instead of 1<<(7-(x&7)). Can't _quite_ make printString() use unescape() out of lib because \q is a thing?
2019-02-09Remove more useless typecasts, wrappers, and inline a function.Rob Landley
2019-02-09Remove some unnecessary wrappers, indirection, and typecasts.Rob Landley
2019-02-08Sigh. Update release version for non-git source builds.Rob Landley
2019-02-08Update news.html for 0.8.0 release.0.8.0Rob Landley
2019-02-07ps, top: fix VIRT and SHR fields.Elliott Hughes
2019-02-05Promote sntp to net.Rob Landley
2019-02-05The android NDK does not appear to have adjtime(). (It has the syscall, andRob Landley
it has clock_settime(), but not the libc adjtime() function...) *shrug* Stub it out in portability.h.
2019-02-05Fix some llvm warnings.Rob Landley
I don't know why NDK llvm is complaining about adjtime(), toys.h is #including <sys/time.h> which http://man7.org/linux/man-pages/man3/adjtime.3.html says is the right header...?
2019-02-05Suppress warnings gcc should not be making (and a comment typo).Rob Landley
2019-02-05Fix server loop timeout logic.Rob Landley
2019-02-05Fix server mode and make request timeout 3 tries of 3 seconds (9 sec total).Rob Landley
2019-02-04Reset screen wrap mode (broken by qemu -nographic output).Rob Landley
2019-02-04sort -o: fix behavior when output file is one of the input files.Elliott Hughes
Bug: http://b/123902291
2019-02-04Next round of sntp work: server and multicast modes, actually set time...Rob Landley
2019-02-04unzip tests.Elliott Hughes
I'm switching to a new laptop, and found this from 2017-07. I think these are the tests used for the Android libziparchive-based unzip. They pass on the host.
2019-02-04who: make the output more like coreutils who.Elliott Hughes
Also add a TODO for the (undocumented, half-finished) -a option.
2019-02-03William Djupström pointed out that xexec() lost the absolute path check.Rob Landley
2019-02-01Fix record-commands and logwrapper.cRob Landley
record-commands: Delete old log, only delete $WRAPDIR at end if path wasn't externally supplied, don't add the rm at the end to the log. logwrapper.c: don't skip filename when measuring space for command line malloc, use argv[0] instead of /proc/self/exe (which is realpath -f).
2019-01-31Tweak build dependencies: rebuild toys/*/*.c when .o newer than .config.Rob Landley
2019-01-31Sed assumed FLAG(r) was 1 but didn't document it above the NEWTOY line. (oops)Rob Landley
2019-01-30Command logging wrapper to help analyze what commands scripts call and how.Rob Landley
2019-01-28bc: Update to upstream version 1.1.0Gavin Howard
2019-01-25nc: allow immediate reuse of ports.Josh Gao
Set SO_REUSEADDR when listening so that we can immediately reuse ports that are no longer being listened upon, instead of having to wait 60 seconds for the socket to be shutdown after being closed (even on localhost!).
2019-01-25No real need to copy data into variables and do nothing else with it...Rob Landley
2019-01-25Add "make bsd_defconfig" and "make macos_defconfig".Rob Landley
2019-01-25OpenEmbedded needs commands installed in specific places.Rob Landley
2019-01-24grep: "tried" should track arguments (not files) that existed, move -o "" testRob Landley
into display function, use unsigned length so output lines can be up to 4g each.
2019-01-24More random in-progress sntp work.Rob Landley
2019-01-22Whitespace: remove tabs from indentation.Elliott Hughes
I accidentally added a tab in xargs.c, so as penance I'll clean up all the tabs.
2019-01-22Fix sigjmp_buf/jmp_buf mismatches.Elliott Hughes
Broke the bionic build: external/toybox/toys/net/netcat.c:188:37: error: incompatible pointer types assigning to 'sigjmp_buf *' (aka 'long (*)[33]') from 'jmp_buf *' (aka 'long (*)[32]') [-Werror,-Wincompatible-pointer-types] if (toys.optflags&FLAG_L) NOEXIT(child = XVFORK()); ^~~~~~~~~~~~~~~~~~~~~~~~ external/toybox/lib/lib.h:375:19: note: expanded from macro 'NOEXIT' #define NOEXIT(x) WOULD_EXIT(_noexit_res, x) ^~~~~~~~~~~~~~~~~~~~~~~~~~ external/toybox/lib/lib.h:367:16: note: expanded from macro 'WOULD_EXIT' toys.rebound = &_noexit; \ ^ ~~~~~~~~ 1 error generated.
2019-01-22Actually calculating/displaying a reasonable time.Rob Landley
Not yet setting, no server/multicast, should validate source address...
2019-01-21Add more comments to ps.c and replace hardcoded value with a macro.Rob Landley
If table grows >64 entries XX needs to change, but it can't be 128 yet because the slot value is a signed char. Currently 59 entries in table...
2019-01-19Have test.sh use portability.sh too.Rob Landley
2019-01-19Factor out scripts/portability.sh and have genconfig.sh use it to find sed/gsed.Rob Landley