Age | Commit message (Collapse) | Author |
|
|
|
collapse flag arrays to fewer lines, factor out xtcgetattr(),
strip curly brackets around single lines, don't have a separate error
message for tcsetattr() return code if more thorough check is on next line,
take advantage of O_RDONLY being zero, document -F.
|
|
Top bits count too!
|
|
|
|
Full POSIX stty with Linux extensions. Output and behavior match coreutils
8.26 as far as I can tell. For some reason busybox 1.22 stty always
shows all the special characters, even when they match "sane". I've
matched coreutils, since "shows differences from sane" is easy to describe
and obviously useful.
Flags in the various arrays are not in the order they're introduced in
POSIX or in the Linux header file: they're in the order that they're
output by coreutils' stty.
The -g output matches coreutils and busybox.
I implemented iuclc, xcase, and olcuc even though they've been removed
from POSIX because the others implement them, and "man stty" defines "raw"
and "sane" in terms of them (where POSIX doesn't define "sane" in any
useful sense).
This builds fine against glibc 2.24, and as far as I can tell all the
constants used were in Linux 2.6 so I'm assuming that there shouldn't
be any #ifdef nonsense needed for any reasonable vintage of C library.
|
|
Before:
toy: Unknown option p (See "toy --help")
After:
toy: Unknown option p (see "toy --help")
|
|
We (Android) give up trying to teach folks what "up 142 days, 1:45"
means...
Bug: http://b/65205261
|
|
|
|
historical accident", so fall back to check there.
Also remove an obsolete comment TODO block, check !parent for dirtree
top of tree instead of '/' in the filename, and typecast some printf
arguments for 32-bit systems.
|
|
|
|
|
|
This shows the other fields in getrusage. I've chosen to only show the
ones actually maintained by Linux.
|
|
This isn't ideal, but it matches xargs and none of us is likely to have
time to do the best possible thing any time soon.
Bug: http://b/65818597
Test: ./toybox find /usr/local/google/ndkports/ -exec echo {} +
|
|
|
|
Also switch to u64 for calculations. Some FUSE file systems have inode
counts large enough to overflow s64.
|
|
More of the files encountered on the Android system image (plus PE
executables, which we build but which shouldn't actually make it to the
system image!).
|
|
iotop -H
|
|
fluff out README, and add a comment to hostid explaining its deprecation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.
|
|
|
|
|
|
(only enable character parsing, force utf8, "C" semantics otherwise.)
|
|
|
|
Both should only output the groups.
|
|
Android now allows ro. properties to have arbitrary lengths. Two
changes need to happen to support this:
1) The length check in setprop.c before attempting to set a property
needs to be removed for ro. properties
2) __system_property_read_callback() must be used in place of
__system_property_get() in getprop.c as only the former is capable
of reading properties with size > 92 characters.
Bug: 23102347
Bug: 34954705
Change-Id: Ib8565a3e6d987dd5e6a5fe790e804ecf8ad1e020
|
|
|
|
of utf8 support (not finished yet)...
Adds new loopfiles_lines() wrapper to lib.c that calls do_lines from loopfiles.
|
|
in segfaults on newer toolchains. (That entire section is due for a rewrite.)
|
|
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
|
|
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
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
program to compare against libc output.
|
|
scripts/*.c builds against lib.c but not linestack.c.
|
|
or care about locale.
|
|
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.
|
|
|
|
|
|
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.
|
|
|