Age | Commit message (Collapse) | Author |
|
|
|
|
|
Bug: 74390492
|
|
|
|
but then the link fails.
|
|
|
|
(Otherwise updating pid to parents makes threads read thread parent data.)
|
|
The first contains display fields selectable by the -o argument,
the second contains the /proc/$PID data for one process.
|
|
(Bionic _does_ do the malloc(0)!=0 thing, the problem is pedantic access
checking, not null dereference. So test count instead.)
|
|
|
|
In cksum, make -H pad with leading zeroes to 8 chars, don't output len with -N,
and don't output filename with zero arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stuff syslog.h does into lib.c and portability.h
|
|
|
|
Implement -c, fix endless loop when illegal char happens with
!outleft (don't need to check errno, just in == toybuf), refill
buffer each time (less efficient handling of illegal chars but never
have to worry about how long constitutes a valid sequence in unknown
encoding).
Fix input longer than 2k (memmove() has src/dest switched, second time through
loop in starts at offset inleft...) Made it start at beginning every time.
Switch iconv_open() error msg to show to/from and errno (rather than
hardwired english text).
|
|
|
|
|
|
The original xxd doesn't support -r with -i. The original also outputs
"unsigned char name[] = { ... };" for input other than stdin, but that
actually makes it less useful --- many languages support array
initializers, but far fewer support that exact declaration syntax.
Also fix the -c range checking and defaulting: ><= in the argument string
only works for floating point arguments.
Bug: http://b/64711851
|
|
Also make -0 and -E mutually exclusive (rather than just ignore -E
with -0).
Bug: https://github.com/landley/toybox/issues/78
|
|
A very simple implementation of fmt, good enough for my daily use of !!fmt
in vi to reflow checkin comments like this.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|