Age | Commit message (Collapse) | Author |
|
instead of a struct. This means it can return "12345" even if that user/group
doesn't exist in /etc/passwd and similar.
All the users were immediately dereferencing it to get pw_uid or gr_gid
anyway, so just return it directly and adjust the users. This fixes
things like "chown 12345:23456 filename".
|
|
|
|
not segfault on a lookup failure (they print the number instead of UNKNOWN).
The whitespace in the default output may need some adjusting.
|
|
|
|
apply it to "true" and "false".
|
|
of number, but never NULL. Both returned in static buffer good through
next call.)
|
|
(man 2 stat says so) and %B is the units on %b (I.E. always 512), so change
output and help text. This matches what other implementations produce.
|
|
seek so seek time is included in total.
|
|
add xopenro() that takes one argument and understands "-" means stdin,
and switch over lots of users.
|
|
The IANA tzcode implementation of mktime (used on Android and BSDs) sets
errno in some cases where it doesn't return -1 to indicate failure, so the
existing test always failed on those systems.
I don't think glibc ever sets errno (which is fine by ISO C, but not POSIX).
Other uses of mktime in toybox are already fine. This one would have been
caught by the existing tests if I was running them on the device :-(
|
|
"make test_scankey" didn't work.
|
|
|
|
|
|
|
|
|
|
Plus basic tests.
|
|
|
|
a patch from Elliott Hughes, who said:
[PATCH] Add support for libcrypto for MD5/SHA.
Orders of magnitude faster (for architectures where OpenSSL/BoringSSL
has optimized assembler).
Also adds sha224sum, sha256sum, sha384sum, and sha512sum for folks
building with libcrypto.
The fallback portable C implementations could easily be refactored
to be API-compatible, but I don't know whether they'd stay here or
move to lib/ so I've left that part alone for now.
|
|
The lack of support for named constants is not a regression relative
to the toolbox implementation.
|
|
|
|
This is enough for everything on Android and everything except Java
on my desktop. Even desktop Chrome fits!
|
|
|
|
Support hex (requested by users).
Support status=noxfer and status=none (requested by users).
Fix status output.
Clarify large numbers in --help output.
Use O_TRUNC rather than ftruncate unless we're also seeking.
New tests.
Also partial cleanup (reuse of existing code, removal of non-GLOBALS globals,
and merge dd_main and do_dd).
|
|
|
|
They're really just arbitrary byte sequences of arbitrary length.
Sure, a 20-byte sequence is _probably_ a SHA-1, but there's no way
to know, so let's stop pretending...
|
|
is explicitly outright insane (%b handles octal escapes differently for no
obvious reason).
|
|
|
|
Read any PT_NOTE sections to look for NT_GNU_BUILD_ID or Android API
level notes. I deliberately didn't NT_GNU_ABI_TAG because it's noisy --
every Linux executable has one -- but not something most command-line
users will have any use for. (And you can ask readelf(1) anyway.)
Also read the section headers to implement "stripped"/"not stripped".
This patch removes "uses %d libs" because it was actually just counting
dynamic sections in the ELF file, and there are only 0 or 1 of those in
a valid ELF flie. (If you really want this functionality, you have to
*parse* the dynamic section looking for the DT_NEEDED entries. But that's
more of a job for readelf(1) than file(1).)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It turns out that "default" goes nowhere. Whereas "silent" actually shows
up in the log. So document "silent" (which we already supported) but
remove support for "default".
Also make the spacing between levels in the help more regular; it looks
weird being in columns when there's only one row!
|
|
|
|
|
|
|
|
It should come as no surprise to those who followed the development of
this that it's not well known which of the various names is actually the
thread name. Adding "thread" to the ps --help output seems like a good
idea.
I'm also assuming that "stat2" was meant to read "stat[2]", since that's
how it mostly appeared on the list while discussing this. Still fits in
80 columns.
|
|
|
|
continues to get worse, and now can't handle INT_MAX/2 either. So our
first workaround _also_ broke.
But posix says "A negative precision is taken as if the precision were
omitted." and that _doesn't_ trigger the glibc bug, so use that instead.
|
|
(Ubuntu's netstat is left justifying the inode field, and they're wrong.)
|
|
7ca5dc4232b9ac5ee5cd25c8b5b33a58904cd251 didn't switch all callers over
to the new functions.
|
|
|
|
Spotted while trying to diff netstat -nt against toybox netstat -nt.
|