aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
AgeCommit message (Collapse)Author
2018-10-30getconf: add -a, fix the LFS_ output, and blame bionic rather than musl for ↵Elliott Hughes
UIO_MAXIOV/_SC_UIO_MAXIOV.
2018-10-27Zach Van Rijn asked for "find -empty".Rob Landley
2018-10-21Add % to lib/args.c (long time in milliseconds), add xmillitime(), redoRob Landley
xparsetime() not to need floating point, adjust callers.
2018-10-21Move start_redraw() to lib/ and have ps.c (top) use it.Rob Landley
2018-10-20Some more --help consistency.Elliott Hughes
From eyeballing the output of for i in `./toybox | tr " " "\n"` ; do ./toybox $i --help ; done | \ grep '^-' | grep -v "\t"
2018-10-07Fix getconf build for musl.Rob Landley
2018-10-06getconf: add missing names used by AOSP.Rob Landley
2018-10-06Say undefined for sysconf/pathconf -1, remove goto, help text tweak,Rob Landley
remove curly brackets around single line if().
2018-10-06date: fix some tests.Elliott Hughes
`errno` isn't meaningful here.
2018-10-05getconf: add pathconf(3) variables.Elliott Hughes
Also improve the -l output to include sections (because you need to know whether you're dealing with a pathconf variable to supply the required path).
2018-10-05getconf: fix glibc NPROCESSORS_ONLN.Elliott Hughes
glibc doesn't have _XOPEN_UUCP (though bionic does), which meant that the generated array of values was out of sync with the hand-written array of names. This patch removes that by using a unified array and the preprocessor. A side benefit of this for me is that it makes toybox easier to integrate in the AOSP build system (the less shell script magic, the better).
2018-09-16file: remove %s with no corresponding argument.Rob Landley
I've had added the argument, but I don't know what it wants? Ubuntu's file calls a bmp file "data".
2018-09-15Add .bmp supoprt to file(1).Elliott Hughes
2018-09-15Add .wav support to file(1).Elliott Hughes
2018-08-31Convert option style.Rob Landley
2018-08-26Add binary file detection to grep.Rob Landley
2018-08-26Convert more commands to the new option/GLOBALS code style.Rob Landley
2018-08-26Remove ls sub-option: always support --color.Rob Landley
(Well, when you say --color or "alias ls='ls --color=auto'" in your shell.)
2018-08-25Convert more argument variables in GLOBALS() to new style.Rob Landley
2018-08-25Coding style change: 1) Use argument letter for variable names filled out byRob Landley
that argument (so "t:" fills out TT.t), 2) go ahead and collate arguments of same type on same line. (Order's guaranteed by C99 either way.)
2018-08-19Comment tweak.Rob Landley
2018-08-17Make microcom use set_terminal() and move speed setting into set_terminal().Rob Landley
2018-08-04wc: fix the column width heuristics even further.Elliott Hughes
This was found by https://kernel.googlesource.com/pub/scm/linux/kernel/git/shuah/linux-kselftest/+/master/tools/testing/selftests/splice/default_file_splice_read.sh which broke after the recent change. Plus this actually fixes another of our existing test failures on the host. I'm assuming we don't want to try the "exact fit" heuristics until we have a concrete need for them. (I haven't fully understood the circumstances under which they're used, though the two remaining host test failures appear to be because of them.) Bug: http://b/111891791 Test: ran tests
2018-08-04file: slightly improve .class, add .dex.Elliott Hughes
2018-07-28Check for integer overflow in pathologically broken elf files by moving theRob Landley
sh_size>file length test inside the loop and changing the vars to unsigned.
2018-07-18ps.c cleanups after help text reshuffle.Rob Landley
2018-07-18Factor out "ps -o help" to show fields, move help text into -o type array,Rob Landley
add comments to get_ps().
2018-07-09Fix wc column widths.Elliott Hughes
2018-06-14Fix cut -DF as awk replacement by not matching delimiterless lines with -DRob Landley
2018-06-14Change do_lines() semantics to end with a callback(0,0) to indicate EOF,Rob Landley
adjusting existing users.
2018-06-12top: remove flicker in interactive mode.Elliott Hughes
2018-06-12top: running processes are shown in bold.Elliott Hughes
2018-06-02Convert more ps help text to two columns.Rob Landley
2018-05-27Teach "file -" to recognize ELF files, add bounds checking and comments.Rob Landley
2018-05-06Support fractional seconds (and other time units) in `top -d`.Elliott Hughes
LTP uses `top -d 0.1`, which isn't convincingly useful, but general support for other time units might be useful, and switching to xparsetime addresses both at once. Also fix 3169d948c049664bcf7216d4c4ae751881099d3e where I mistakenly treated `rev` and `toys.optflags&FLAG_b` as interchangeable. (Without this second fix, `top -b` looks fine but `top` is broken!) Also fix xparsetime to reject input such as "monkey" or "1monkey".
2018-04-23Don't include spurious '\r's in `top -b` output.Elliott Hughes
2018-04-18Add the flags linux kernel build checks for.Rob Landley
2018-04-13Add getconf.Rob Landley
2018-04-12Fix "cp -p" doesn't preserve timestamps bugMinghui Liu
2018-04-08Add cp --parentsRob Landley
2018-04-08Add mkpath() for common case of mkpathat(), and #define magic constants.Rob Landley
2018-03-19Ryan Prichard pointed out that du -d0 should act like du -s, but the plumbingRob Landley
wouldn't let him assign a negative default value, so I fixed it.
2018-02-22Bugfix, facility values are <<3 in the headers.Rob Landley
2018-02-18Work around a musl-libc bug that has facilitynames/prioritynames in headersRob Landley
but then the link fails.
2018-02-10Fix ps -T again, but this time read files from tid directory, not pid.Rob Landley
(Otherwise updating pid to parents makes threads read thread parent data.)
2018-02-10Rename struct strawberry -> struct ofields, and carveup -> procpid.Rob Landley
The first contains display fields selectable by the -o argument, the second contains the /proc/$PID data for one process.
2018-02-09Andreas Gampe suggested a different fix.Rob Landley
(Bionic _does_ do the malloc(0)!=0 thing, the problem is pedantic access checking, not null dereference. So test count instead.)
2018-02-08Thinko pointed out by Andreas Gampe (causing segfaults in top, oops).Rob Landley
2018-02-04Add crc32.Rob Landley
In cksum, make -H pad with leading zeroes to 8 chars, don't output len with -N, and don't output filename with zero arguments.
2018-01-24Revert the ps -T thing until I understand what Elliott wants.Rob Landley