Age | Commit message (Collapse) | Author |
|
Avoid fgets() into toybuf other than to skip header lines, preferring
fscanf() or xgetline() instead.
Remove the early returns if we fail to skip a header line (fixes #62).
Fix `netstat -xl` which was previously broken (because only -a would
include listening sockets).
Fix a variety of formatting issues, bringing the diff between toybox
netstat and net-tools netstat down (which was what I used for testing).
Use FLAG() more consistently.
|
|
|
|
Can't use the same set_terminal() logic as ptys because it not displaying
data, it should just accurately copy it.
|
|
|
|
|
|
|
|
|
|
Use s# instead of atoi, meantion -s default in help text, use toybuf instead
of stack buf, reuse i instead of declaring a separate ssize_t, FLAG() macro.
|
|
|
|
|
|
|
|
In case I'm not yet in the running for the most pedantic change of this
release, I think the "days of the week are written with initial capitals
in English" subset of this patch is a strong contender.
(Found via `toybox help -a | ispell -l | sort | uniq`.)
|
|
min/max weren't being calculated, only print summary when we recieved
at least one reply packet. And switch to FLAG() macros.
|
|
The epoch was being defined as UL, which is fine for LP64, but too small
on LP32 for what we're trying to do.
toys/net/sntp.c:60:32: warning: left shift count >= width of type
return ((tv.tv_sec+SEVENTIES)<<32)+(((long long)tv.tv_nsec)<<32)/1000000000;
^~
(Android doesn't use this, I'm just fixing this too while I fix the
LP64isms I introduced in readelf...)
|
|
|
|
|
|
|
|
And check in more multicast support that's been sitting in the tree, I don't
have a test enviornment for it anymore but somebody wanted this...
|
|
Investigate why downloads always freeze when I call ftpget. Trace it to
a refactor leaving two REST and zero RETR.
|
|
does CLOEXEC (should fix macos build).
|
|
The change from ioctl to xioctl in
844f0d1aae28c54bbb672f53ba2cda182c572129 broke ifconfig for non-root on
Android. SIOCGIFHWADDR has been protected to prevent device tracking
since Nougat.
Bug: https://issuetracker.google.com/137671590
|
|
Rename the existing xbind/xconnect to xbindany/xconnectany, to make room
for new xbind/xconnect that are more like 'x' versions of the regular
bind and connect. Move explicit bind/connect callers over to
xbind/xconnect.
Of the affected commands, only netcat is actually used by Android. It
was the most recent patch to netcat that made the lack of a more
traditional xbind/xconnect apparent.
|
|
Other implementations of netcat support UNIX domain sockets via -U, so
this change adds it to toybox too.
Example usage:
Create ./uds as a UNIX domain socket and listen on it, forwarding
messages to bash:
> nc -U -s ./uds -L /bin/bash
Connect to ./uds as a UNIX domain socket
> nc -U ./uds
|
|
More consistent tense, capitalization, and punctuation. A few commands were
missing an introductory line, so I copied those from the first comment
line.
|
|
|
|
Inspired by some of the small patches that have gone by recently.
Limited to only things found in `generated/help.h`, plus a wider cleanup
for the more common "milisecond" typo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set SO_REUSEADDR when listening so that we can immediately reuse ports
that are no longer being listened upon, instead of having to wait 60
seconds for the socket to be shutdown after being closed (even on
localhost!).
|
|
|
|
|
|
|
|
Previously, when trying to listen on a socket without using one of -4,
-6, or -s, we tried to create an AF_UNSPEC socket, which fails.
|
|
|
|
|
|
Be consistent about upper versus lower case. (Upper seems to have the
majority, so I went with that, though I'm happy to provide the opposite
patch as long as we're consistent!)
Be consistent about using \t. (Though saving a few bytes seems like it
might be better done in the code that generates help.h rather than
directly in the source, since tabs make careful ASCII art layout hard
enough that we regularly have things misaligned.)
Remove trailing periods (most of which seem to have been added by me).
Always use the US "human readable" rather than my British
"human-readable", and be more consistent about declaring whether we're
showing multiples of 1000 or 1024.
Just say "verbose" rather than adding a useless "mode" or "output".
|
|
|
|
xparsetime() not to need floating point, adjust callers.
|
|
From eyeballing the output of
for i in `./toybox | tr " " "\n"` ; do ./toybox $i --help ; done | \
grep '^-' | grep -v "\t"
|
|
|
|
|
|
|
|
|
|
|
|
|