aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-10Tweak help_exit() to show "See %s --help" message on the same line.Rob Landley
2017-10-10Complete rewrite of cut. Handle multipe ranges, add -DFO options, startRob Landley
of utf8 support (not finished yet)... Adds new loopfiles_lines() wrapper to lib.c that calls do_lines from loopfiles.
2017-10-03Workaround from Patrick Oppenlander for a bug in config2help.h that resulted0.7.5Rob Landley
in segfaults on newer toolchains. (That entire section is due for a rewrite.)
2017-10-01Fix xargs to obey POSIX's ARG_MAX restrictions.Elliott Hughes
This avoids "xargs: exec echo: Argument list too long" errors in practice. find(1) needs to be fixed too, but that's a bit more complicated and a working xargs provides a workaround. Bug: http://b/65818597 Test: find /proc | strace -f -e execve ./toybox xargs echo > /dev/null
2017-09-25Basic Mach-O support in file(1).Elliott Hughes
The Nexus Player build was subtly broken in that it assumed that the host was using ELF. No-one noticed until a Mac user tried to flash their build, which contained a Mach-O x86 binary instead of an ELF x86 binary. Hilarity ensued. (On the same day, file(1) was able to explain a mixup with an ELF hexagon binary. Next time we see a Mach-O binary on an Android device, we'll be ready!) Bug: http://b/66741960
2017-09-21Add #warning about musl intentionally breaking chrt.Rob Landley
2017-09-16Fix URL typoZach Riggle
2017-09-09Last commit used xstrtod(), forgot to check it in.Rob Landley
2017-09-09Redo/add seq precision logic.Rob Landley
Josh Gao hit a case where "seq 1000000 1000001" output 1e+06, and while he was there changed several things to work like existing seq implementations. I changed a couple back (commenting out the test cases) until somebody came come up with a reason (or existing use case) to do it that way.
2017-09-06Tighten up wc -m tests (which no longer depend on $LANG).Rob Landley
2017-09-05Replace remaining mb*towc() calls with utf8towc().Rob Landley
2017-09-05Tweak utf8towc() to return -1 earlier sometimes (instead of -2), and add testRob Landley
program to compare against libc output.
2017-09-02utf8towc() has to be in lib.c if strlower() is going to use it, becauseRob Landley
scripts/*.c builds against lib.c but not linestack.c.
2017-09-02In wc, replace mbrtowc() with new utf8towc() which doesn't have a context structRob Landley
or care about locale.
2017-08-31Another try at fixing the ps segfault resulting from /proc entries vanishingRob Landley
out from under us due to asyncronous process exit. The directory we're traversing vanishing can result in DIRTREE_ABORTVAL being returned, which we turn into a NUL entry, but then we were trying to look at that null entry's children. Oops.
2017-08-23Fix iconv build and add trivial test.Elliott Hughes
2017-08-17lsof cleanup.Rob Landley
2017-08-06Check for .git before setting GITHASH.Rob Landley
The GITHASH problem was building a tarball version under an existing git repo, where git describe found ../../../../.git so only call git if we have a .git directory in the source.
2017-08-05Allow GITHASH to be set on the command line, to work around a yocto bug.Rob Landley
2017-08-04Don't unnecessarily use printf in wc.test when echo will do.Elliott Hughes
(And is much faster if your shell doesn't have a builtin printf.)
2017-07-25Test that our rm -rf can zap chmod 000 directories. (Skip test on hostRob Landley
because ubuntu's can't.)
2017-07-23Add basic env.testRob Landley
2017-07-22testcmd should only use absolute path to command when not doing TEST_HOST.Rob Landley
2017-07-22Typo (env -0 was checking the flag wrong).Rob Landley
2017-07-21netcat: make -l exit after handling a request.Josh Gao
Bug: http://b/62305466
2017-07-17typoRob Landley
2017-07-17Redo ping plumbing. Actual ping part isn't there yet because kernel weirdness.Rob Landley
2017-07-17Split out xgetaddrinfo() from xconnect()Rob Landley
2017-07-11Don't remove "remount" from the option list during early parsing, the mountRob Landley
flag doesn't get set right otherwise and it tries to overmount instead.
2017-07-11comma_scan()'s clean option wasn't removing entry at end of list.Rob Landley
2017-07-09dd cleanup: binary search is overkill, eliminate struct pair,Rob Landley
simplify strstarteq, use local variable "conv" instead of toys.optargs.
2017-07-09Fix -Wformat compiler warning in expr.c.Elliott Hughes
Android forces -Wformat on for all source. toys/pending/expr.c:116:28: warning: field precision should have type 'int', but argument has type 'long' [-Wformat] ret->s = xmprintf("%.*s", m[1].rm_eo-m[1].rm_so, target+m[1].rm_so); ~~^~ ~~~~~~~~~~~~~~~~~~~~~
2017-07-07Posix says strings should only output hits that end with NUL or newline.Rob Landley
We don't currently do that, but a test suite checking that we don't do that is requiring us to violate posix to pass it.
2017-07-07strings -t oxd testsIlya Kuzmich
2017-07-07Make dd use atolx_range(), and teach atolx_range() about "w" suffix (word, *2).Rob Landley
2017-07-07Fix dd tests so TEST_HOST passes. (Ubuntu's dd doesn't support hex valuesRob Landley
and don't expect a specific error message, just that it errored.)
2017-07-02Add -t, deviations from posix, redo loop to have fewer duplicate tests.Rob Landley
2017-07-02strings tests and bugfixesIlya Kuzmich
Fixes missing newline in output if last byte of the input is string. Fixes one-off offset bug. Adds strings tests. Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
2017-06-27whitespace/comment tweaks.Rob Landley
2017-06-27teach head -cIlya Kuzmich
Not POSIX, but implemented in coreutils, busybox and freebsd.
2017-06-26Most things seem to want the "b" suffix to mean 512 instead of 1.Rob Landley
(According to the git history I added "b" for "od" but the man page says 512 there too.)
2017-06-19Past time for 0.7.4.0.7.4Rob Landley
2017-06-19Manually inline TOP_COMMON and PGKILL_COMMON help text until I can teachRob Landley
the help infrastructure to handle it. (The lifetime rules are all wrong for hunks that get reused. Needs a largeish rewrite.)
2017-06-14Grep exits with 2 for errors, which can happen at any time ( > /dev/full).Rob Landley
2017-06-13config2help.c: Rename trim() to skip_spaces(), fluff out comments a bit.Rob Landley
2017-06-12Add grep -M match and -S skip supporting wildcard patterns.Rob Landley
They don't imply -r because you might do find . -type f | xargs -S blah regex
2017-06-11Twitter's code of conduct page went down, so mirror the old archive.org version.Rob Landley
Move link from README to header.html menu bar.
2017-06-11Provide error messages for files we can open but not read (ala directories).Rob Landley
2017-06-10Fix bug where grep stopped at first dangling symlink and error_exited().Rob Landley
2017-06-09Promote dmesg back to lsb.Rob Landley