Age | Commit message (Collapse) | Author |
|
|
|
more recently than the resulting mount point.
|
|
|
|
|
|
Use "" instead of '' to quote command as the command contains expandable
variables.
Change-Id: Iaa8825e56243b369199588cbf6e47a1aba985804
|
|
|
|
|
|
Requested by aheirman on github: uses access(X_OK) which checks access
control lists as well as permissions, and that _we_ can access them
(u+x could be owned by a different user)...
|
|
|
|
|
|
|
|
|
|
|
|
Also reorder the --help output to separate the "whats" from the "hows",
as with other commands that have lots of options, and add units to the
help too.
|
|
by not writing as much payload as the header promised.
|
|
|
|
Add a test, with comment that "make install_test" doesn't currently exist...
|
|
Ethan Sommer noticed that chown is using chgrp_main() due to OLDTOY, so
the wrapper function isn't needed.
|
|
|
|
Starting two netcats at the same time and expecting them to be able to
talk to each is a little optimistic. I don't know whether `sleep .1`
will be sufficient, but wanted to try that before going to `sleep 1`
since neither the toybox nor the github nor the Android infrastructure
is running these tests in parallel, those seconds add up.
Right now this has a ~20% flake rate on the Android infrastructure. I
was able to reproduce the flake locally with `while true ; do make
test_netcat ; done` on my desktop before this patch, but not after.
(Though my desktop is way overpowered for just running that, whereas the
build servers tend to be pretty busy, which is why I reserve the right
to return later with a longer delay.)
|
|
Avoid fgets() into toybuf other than to skip header lines, preferring
fscanf() or xgetline() instead.
Remove the early returns if we fail to skip a header line (fixes #62).
Fix `netstat -xl` which was previously broken (because only -a would
include listening sockets).
Fix a variety of formatting issues, bringing the diff between toybox
netstat and net-tools netstat down (which was what I used for testing).
Use FLAG() more consistently.
|
|
|
|
I need to set up a test environment for this...
|
|
|
|
|
|
Instead of unlink() && check errno, call lstat() explicitly to check
file existence if "-f" is specified.
There is a regression when if the path to be removed is nonexistence
and within a readonly filesystem, then unlink() could set the EROFS
errno instead of ENOENT, thus screwing up the output of `rm`.
|
|
or else singlemake enables it for all commands. (I was trying to
move it out of the command namespace, but it's not a global config
option either...)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove STDIN_FILENO and use FLAG().
Use xsetspeed() rather than have a duplicate table.
Inline getty's print_prompt().
There's still a lot of cleanup needed here, in particular use of toybuf
and removal of the inappropriately-named HOSTNAME_SIZE (and ideally
sharing that logic with login(1) which already contains a better
implementation of it).
|
|
|
|
and address TODO where -z was still splitting patterns on \n
|
|
|
|
|
|
|
|
no argument returns NULL same as --opt without =
|
|
mksh doesn't support the {a..b} bashism or the ${!name} bashism, causing
the tests to fail on Android.
This works for me on both mksh and bash (both tested on Debian).
|
|
Add new toy `base32`. Add tests for `base32`.
base32 is added by adapting the base64 encode/decode function to also do
base32 encoding/decoding. Then their respective main functions set up
the global parameter `n` to be the number of bits used in the encoding
(5 for base32 and 6 for base64) and `align` to align the result to a
certain length via padding. These are deliberately kept as parameters to
enable future expansion for other bases easily.
|
|
Pointed out by the compiler combined with glibc's use of
__attribute__((__warn_unused_result__)) on write().
|
|
We need <xlocale.h> for newlocale(3) on macOS, despite it being in POSIX 2008's <locale.h>. musl apparently doesn't have <xlocale.h>, so that's another trick
to teach to portability.h...
|
|
|
|
|
|
|
|
|
|
|
|
Note: can't put in portability.h because it's a linux/ include.
|