aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-07Snap for 7263361 from 4398f03e7566df60b08eca229c440d8d886cf0b3 to sc-releaseandroid-build-team Robot
Change-Id: I94f10634c9e6e972b170d54a71f14f0f2f9b8d6e
2021-04-06Merge remote-tracking branch 'toybox/master' into HEAD am: 29ae04250e am: ↵Elliott Hughes
33b265753f am: 8f417134fc Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1663639 Change-Id: I2f2dcc970f6a2566e74a51416177021e928ba575
2021-04-06Merge remote-tracking branch 'toybox/master' into HEAD am: 29ae04250e am: ↵Elliott Hughes
33b265753f Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1663639 Change-Id: I9585d444f322a3b5a6f14fbbc35ac7cc22ec38f0
2021-04-06Merge remote-tracking branch 'toybox/master' into HEAD am: 29ae04250eElliott Hughes
Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1663639 Change-Id: I61fb1fdc96e320fe7015ac604d7c726f76054895
2021-04-05Any / in string makes it a path, not just absolute path.Rob Landley
Note: toy_exec() does an exact name match so fails given a path anyway, it's just an optimization to avoid the binary search, but special casing absolute path while very cheap isn't _correct_...
2021-04-03Fix the next test.Rob Landley
2021-04-03Add a missing pop_block().Rob Landley
2021-04-02Merge remote-tracking branch 'toybox/master' into HEADElliott Hughes
Change-Id: I14eea373d1242bc16afafc4ddc6ca305ef6b044e
2021-04-01TypoRob Landley
2021-03-31Toysh: adding function logic screwed up pipe/block logic. Fix it.Rob Landley
Remove cached blk/pout/urd and make TT.ff->blk always be populated instead (like TT.ff, list is never empty), have current pipe (and block trailing) redirections live in current TT.ff->blk. Left in a bunch of commented debug printfs and a filehandle dump function.
2021-03-29Fix system calls and get rid of tempfileMichael Christensen
2021-03-27More cleanup of chsh.cRob Landley
2021-03-27chsh cleanup: Reindent and tweak help text.Rob Landley
2021-03-26Create (lsb) chsh commandMichael Christensen
2021-03-24Fix install -tEthan Sommer
2021-03-20Nir Lichtman pointed out that rm -p shouldn't try to rmdir / at the end.Rob Landley
2021-03-19Fix another sh regression.Rob Landley
2021-03-19Fix some more sh regressions.Rob Landley
2021-03-18Fix first few testsuite regressions from function/local plumbing.Rob Landley
2021-03-18telnetd: don't exit if waitpid() returns 0.Elliott Hughes
Noticed while using telnetd to manually test some telnet fixes: telnetd would sometimes exit when I'd disconnect because it couldn't find pid 0 on its list of sessions. I've not seen obscure exits because select() times out, but I've also changed that `return` to an error_exit() so we'll at least know what's happened if that ever occurs. Also use <arpa/telnet.h> rather than manually #define'ing its constants, use the FLAG() macro throughout, and xsetsockopt(). Don't pointlessly set errno to 0 at the start of main and then never look at it again.
2021-03-17init: fix waitforpid().Elliott Hughes
The kill(2) should be checking whether `pid` still exists, not the process that wait(2) just told us has exited.
2021-03-17Tighten up parse_word() a bit and and teach it to read empty ${}Rob Landley
(fixes up some test suite tests).
2021-03-17vi: various fixes.Elliott Hughes
I've been using toybox vi as a makeshift "less" lately. This patch contains all the fixes I've made... $ should go to the last character before the newline, not the newline. Fix ^b and ^f, and ^e and ^y (which was mistakenly ^u before, which is also a movement key, but half of ^d/^u, neither of which we actually implement, and neither of which I've ever used myself --- I might have large hands, but they're not _that_ large). Fix the display of lines longer than 1024 characters. Fix the display of the "~"s after the end of the file, and use VT100 dim to make it a bit more obvious that they're not actually part of the file. Also be a bit more consistent about \033 which is the most common way to write \x1b in toybox. Don't show the status while in ex mode. Make what the status is showing a little less unclear by adding a "C" for the byte offset and file size, and add a percentage (albeit one based on bytes rather than lines). Fix the flickering seen on updates with the usual stupid trick of setting a large buffer. Handle SIGWINCH. Add support for Home/End/PageUp/PageDown. Remove a bit of duplication around calls to draw_page().
2021-03-17Add local variables and basic function() support plumbing.Rob Landley
Not fully wired up yet, probably a bunch of regressions.
2021-03-17Snap for 7213262 from 87a238b94eb2da20a8f0ccb0fb726992ea682739 to sc-releaseandroid-build-team Robot
Change-Id: I592ee83f67393a0bcbfd7e87790eb3418245a407
2021-03-16Merge remote-tracking branch 'toybox/master' into HEAD am: 7b76a4f414 am: ↵Elliott Hughes
935eafc9a6 am: 32380c5430 Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1639371 Change-Id: Ibd60d202458d3bb1eccb297667c69c827a456b83
2021-03-16Merge remote-tracking branch 'toybox/master' into HEAD am: 7b76a4f414 am: ↵Elliott Hughes
935eafc9a6 Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1639371 Change-Id: Ice215de956d1e651f9b8884ef8fffcb1c5ec5054
2021-03-16Add more shell tests, and teach txpect to do regex matches (RO and RE).Rob Landley
2021-03-16Merge remote-tracking branch 'toybox/master' into HEAD am: 7b76a4f414Elliott Hughes
Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1639371 Change-Id: I1c03697b89a7e541597e4da57b16996c6bbb2513
2021-03-15Merge remote-tracking branch 'toybox/master' into HEADElliott Hughes
Change-Id: I9874262daf5ffe740a67078b89fec34c6abe6d76
2021-03-15chmod: fix +X.Elliott Hughes
I broke this when I added the masking out of the S_IFMT bits for macOS, because string_to_mode needs the full mode with those extra bits, specifically so that it can recognize directories for +X to work. I've duplicated chtest rather than change chtest to explicitly set the modes to 000 before running the given chmod command because I didn't want to touch *all* the tests and obscure the addition of just one.
2021-03-16Snap for 7209903 from 340afa9d22bae29c616b5e449a2e4e781fb70bac to sc-releaseandroid-build-team Robot
Change-Id: Ic6c6a4618e63bc1d2f91a5a8120b35817390e6f8
2021-03-15Merge remote-tracking branch 'toybox/master' into HEAD am: afa9580831 am: ↵Elliott Hughes
9540d05179 am: 10315372ce Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1633265 Change-Id: I7b8185ff848d307c8885b1957362eea26649c37f
2021-03-15Merge remote-tracking branch 'toybox/master' into HEAD am: afa9580831 am: ↵Elliott Hughes
9540d05179 Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1633265 Change-Id: I31eb754432d66543a1ec607de4e4344c85646c46
2021-03-15Merge remote-tracking branch 'toybox/master' into HEAD am: afa9580831Elliott Hughes
Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1633265 Change-Id: I6073e6715052e96f1ed2310e1760c030648a5fc3
2021-03-13Commit 3b9cfa70db needed some cleanup I forgot to do, oops. Elliott stumbledRob Landley
across one of the issues I forgot to fix. Added a couple comments and renamed a variable to try to clarify the code while I was there.
2021-03-13Elliott spotted that errno==EAGAIN usually goes with an rc of -1, not 0.Rob Landley
(I hit 0 paired with EAGAIN causing premature pipeline end many years ago when a pipeline was Ctrl-Z then fg, may not still be possible with modern kernels but I left that covered just in case.)
2021-03-12Merge remote-tracking branch 'toybox/master' into HEADElliott Hughes
Change-Id: Ie0b793c73bf9e6c593ee13675360f3ecf94eb546
2021-03-12Fix grep bug testing errno before check statusRobin Hsu
It's legal for a system call to set non-zero errno and return a good status. The caller (grep) should check return status first. Test: 2000 loops of greping 1000+ lines each loop Signed-off-by: Robin Hsu <robinhsu@google.com> Change-Id: I55f7cd5d8a6289c5e8a21ed3057e995a75b9b4fa
2021-03-12df: Allow -P + -k together as defined in POSIXDaniel Santana
2021-03-11Snap for 7199033 from df11b64fef81eac90b45956b7c4967a74bf7dc8a to sc-releaseandroid-build-team Robot
Change-Id: I12cc01ee12860f3c26813d70176543c473e5495a
2021-03-10Merge remote-tracking branch 'toybox/master' into HEAD am: 4eb2e46036 am: ↵Elliott Hughes
903b492178 am: 4410e4959e Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1624339 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I943637567d810ffb23fd29de8f43265f5952568b
2021-03-10Merge remote-tracking branch 'toybox/master' into HEAD am: 4eb2e46036 am: ↵Elliott Hughes
903b492178 Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1624339 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie648a1b13cb895bd143fd82539e8745320bd761e
2021-03-10Merge remote-tracking branch 'toybox/master' into HEAD am: 4eb2e46036Elliott Hughes
Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1624339 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idaffe48d063936f1cc5ae8fa0ee7f12881e0686a
2021-03-09Merge remote-tracking branch 'toybox/master' into HEADElliott Hughes
Change-Id: I9529a5d22c2db3b2c18ffc32ff1ef4ca183e3eef
2021-03-09Minor tweaks: #define -> inlineable function, while() -> for(;;)Rob Landley
2021-03-09tar: fix base-256 output.Elliott Hughes
A tar file created by toybox tar with values large enough to need base-256 rather than ASCII octal caused a tar reader to crash, and caused GNU tar to complain. I note from the docs at https://github.com/libarchive/libarchive/blob/master/libarchive/tar.5#L326 that they imply that only the top *bit* should be set to indicate this format, not the whole top byte, to give a 95-bit or 63-bit field. But I don't think we can hit that in practice? Bug: http://issuetracker.google.com/181683612
2021-03-05Some more shell tests.Rob Landley
2021-03-04Snap for 7183400 from 30776183a02e13331a75437e5c2c031708affb59 to sc-releaseandroid-build-team Robot
Change-Id: I4e8a64ff1b8900478161f25218b95576853cdb0d
2021-03-03Merge "Merge remote-tracking branch 'toybox/master' into HEAD" am: ↵Elliott Hughes
6af8314baf am: 7df98b2389 am: 9ccacb45d7 Original change: https://android-review.googlesource.com/c/platform/external/toybox/+/1611619 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I776b1b8e66dd40939120a6aa0a61e7a596ff1f6a