Age | Commit message (Collapse) | Author |
|
Switch the printf over to %s because the input is actually hex (so %d
is wrong), but without the leading "0x" that %x would require.
For some reason the NODE assignment wasn't providing any input to awk
(hence the hang), and awk wasn't looking for the correct field anyway.
The tests still fail for me:
losetup: /dev/block/loop0: No such device or address
losetup: /dev/block/loop0: No such device or address
losetup: file: No such file or directory
losetup: needs 1 arg (see "losetup --help")
But at least now they allow the other tests to continue!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bringing the zlib-based gzip/gunzip/zcat over to toybox is a problem for
another day, but at least the tests are easy...
(These tests pass with TEST_HOST and on the toolbox versions, but the
toybox toys are in pending and very broken.)
|
|
|
|
|
|
|
|
stuff syslog.h does into lib.c and portability.h
|
|
terminates parsing of Config.in at first blank line. This is because
getdelim() in portability.c returns -1 whenever the line comprises only
a single linefeed character. Fixing this was a trivial change to two lines
(see below), and config2help now works on OS X but I haven't regression
tested this on any other commands which rely on getdelim()"
|
|
|
|
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.
|
|
|
|
|
|
Found running LTP file system tests on Android.
Bug: http://b/70627145
|
|
|
|
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.
|