aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-03Only free the environment variables we didn't inherit from exec.Rob Landley
2020-01-03Finish cd, make help -ahu unconditional, fix expand memory cleanup path,Rob Landley
set $HOME $PWD and $OLDPWD, fix prompt \w, shuffle some functions around to avoid prototypes, implement tilde expansion, add FORCE_COPY.
2020-01-03No, optflags gets cleared by toy_init(), use toys.rebound instead.Rob Landley
2020-01-03Add MAYFORK to "help", teach it to behave differently when called as aRob Landley
builtin, and add -u.
2020-01-01Use FLAG() macros.Rob Landley
2020-01-01Add MAYFORK to more pseudo-builtins.Rob Landley
This doesn't (yet) add shell builtin awareness to time, kill, or pwd, just lets them run in the shell process.
2020-01-01Factor out array_add(), replace argxtend().Rob Landley
2020-01-01If allocation update is done in blocks, initial allocation has to populateRob Landley
a full block.
2019-12-31toysh: start of <(echo hello) support.Rob Landley
2019-12-29Implement single command env assignments (abc=def command) and make debugRob Landley
output #definable.
2019-12-29Debug basic pipe support and I/O flush for builtins.Rob Landley
2019-12-28Add VERBOSE=xpectRob Landley
2019-12-28Fiddle with docs a bit.Rob Landley
2019-12-28More sheer pedantry.Rob Landley
2019-12-28Rename get_chunk()/dump_chunk() to read_chunk()/write_chunk().Rob Landley
2019-12-28Cleanup, mostly whitespace.Rob Landley
2019-12-28Sheer pedantry.Rob Landley
2019-12-28Cleanup: use FLAG() macros and new argument variable names.Rob Landley
2019-12-28Allow dlist_terminate() to be called repeatedly on same list.Rob Landley
2019-12-28Next round of sh plumbing: more work on redirect and pipe, use CLOEXEC.Rob Landley
2019-12-28Change variable type to avoid typecast.Rob Landley
2019-12-28tar: fix memory write errorEmmanuel Nicolet
Clear the last byte of the allocated buffer.
2019-12-26Fix setsid with vfork, redo command line arguments.Rob Landley
Switch -t to -c (like man page says), add -w (wait) and -d (detach from tty)
2019-12-23Toysh passes two tests now! Woo! (Otherwise, does not remotely work right now.)Rob Landley
2019-12-23Add "texpect" and add a couple simple examples to sh.test.Rob Landley
2019-12-22gzip: reject non-gzip files in zlib path.Elliott Hughes
It turns out that zlib defaults to just copying data verbatim if the input isn't in gzip format, rather than rejecting it. Explicitly add a check that zlib isn't doing that. (The toybox inflation path already errors out.) Also add the missing test.
2019-12-22Streamline init for NOFORK (fewer unnecessary syscalls for shell builtins).Rob Landley
2019-12-22Bugfix: tee with no arguments was writing to stdout twice.Rob Landley
Add basic smoketest while we're at it.
2019-12-21Add patch -F (fuzz factor)Rob Landley
2019-12-21Tighten up unquote_file()Rob Landley
2019-12-21Very basic patch smoketestRob Landley
2019-12-20Making sh single build work broke other single builds. Fix them again.Rob Landley
2019-12-20patch: support [FILE [PATCH]] arguments.Elliott Hughes
POSIX only mentions -i/stdin, but GNU patch -- and Larry Wall's patch 1.3, found via https://en.wikipedia.org/wiki/Patch_(Unix) -- also support supplying the name of the file to patch and the name of the patch file as optional arguments. The AOSP build makes use of this syntax to patch snakeyaml to remove references to java.beans.* stuff.
2019-12-15Nothing in pending should default y.Rob Landley
2019-12-14Any substitute EVAL should supply its own --Rob Landley
2019-12-14Teach "make sh" to make the multiplexer and builtins, even though it's "single".Rob Landley
2019-12-14Bugfix: xgetline() wasn't returning NULL at EOF.Rob Landley
2019-12-14dirtree.c: avoid spurious EINVAL warnings.Elliott Hughes
An Android engineer complained that they were seeing this when not running as root: $ adb shell ls ls: ./postinstall: Invalid argument ls: ./init: Permission denied ls: ./data_mirror: Invalid argument ls: ./init.environ.rc: Invalid argument ls: ./metadata: Invalid argument acct adb_keys apex From strace, it was here: newfstatat(4, "adb_keys", 0x7fc67eca88, AT_SYMLINK_NOFOLLOW) = -1 EACCES (Permission denied) readlinkat(4, "adb_keys", 0x5e843c7720, 4095) = -1 EINVAL (Invalid argument) So stop looking at st.st_mode (and then deciding to do a readlinkat()) if we didn't actually successfully stat().
2019-12-13fix loopback device mount failwayling
When we "losetup" success need mount loop device. Found this issue on AndroidQ
2019-12-12Next round of toysh work, with associated lib plumbing.Rob Landley
2019-12-06Squash a warning.Rob Landley
2019-12-06du.test: skip on Mac.Elliott Hughes
None of the current tests are relevant on the Mac because small symlinks are inlined into inodes, as are empty directories, so everything's using zero blocks.
2019-12-06printf.test: work around bash 3.2 on the Mac.Elliott Hughes
2019-12-06stat: fix filesystem type on macOS.Elliott Hughes
(Also show unknown values on Linux in hex rather than just "unknown".)
2019-12-06main.c: fall back to user's locale.Elliott Hughes
We still prefer C.UTF-8 for predictability, but macOS doesn't have that.
2019-12-04Fix getopt optstringE5ten
Move longopts after their corresponding shortopts instead of before
2019-12-04ifconfig.test: deflake.Elliott Hughes
::2 can legitimately be part of an IPv6 address, causing the test to fail because the grep matches an unrelated part of the output. Be more explicit about what we're actually searching for (as the previous test already was) to avoid flakiness.
2019-11-24bc: fix a comparison bugGavin Howard
2019-11-23macos_miniconfig: add cp, mktemp, and mv.Elliott Hughes
All three have been in use for the Android build for a while now, and all the tests pass.
2019-11-23file.test: fix /dev/zero major/minor for Mac.Elliott Hughes