Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
Bug: http://b/62305466
|
|
|
|
|
|
|
|
flag doesn't get set right otherwise and it tries to overmount instead.
|
|
simplify strstarteq, use local variable "conv" instead of toys.optargs.
|
|
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);
~~^~ ~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
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>
|
|
|
|
Not POSIX, but implemented in coreutils, busybox and freebsd.
|
|
the help infrastructure to handle it.
(The lifetime rules are all wrong for hunks that get reused. Needs a largeish
rewrite.)
|
|
|
|
They don't imply -r because you might do find . -type f | xargs -S blah regex
|
|
|
|
|