Age | Commit message (Collapse) | Author |
|
|
|
|
|
ioctl(). (This is a thing Android's old mount already does.)
|
|
confusing update-alternatives, the paths of the links installed by toybox should
match those installed by busybox. This is accomplished by changing the flags
of a few tools within toybox.
|
|
|
|
|
|
|
|
Also, xstrdup() the unmodified template because changing the environment string
could make the changed version show up in "ps".
|
|
|
|
|
|
|
|
Include full template in error messages.
Don't report success on failure with -q.
Avoid unnecessary allocation.
Fix "xxxxxx" versus "XXXXXX" confusion.
|
|
The OS mostly catches this for block devices, but calling "mount -a" twice
shouldn't overmount tmpfs entries with new tmpfs instances. (This needs a test
suite entry, and the test suite needs a root context to run in...)
|
|
Probe the default buffer size, replace the constants with FLAG_x macros, add -r,
replace the byte at a time output with a single xwrite(), more comments.
|
|
|
|
Android is missing all of these; we need to probe for some so we have
a config symbol to depend on.
sethostname() is easily replaced.
We got termios.h via pty.h; now it's not included in configure-step tools,
so we need termios.h to generate globals.
|
|
analysis, plus occasional tweak by me while reviewing them.
|
|
mount, 2) Don't stop checking filesystem types due to EBUSY, it may mean already mounted by another filesystem type you haven't tried yet.
|
|
add better error reporting.
|
|
|
|
|
|
we want to redirect both, one, or neither of stdin/stdout.
|
|
|
|
|
|
|
|
(It's not like systems implementing -b binary and -t text still matter.)
|
|
Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction.
|
|
On my machine, for a 2.2 GB file of random bytes, the timings with
warm cache are:
toybox before: 11.4 seconds
toybox after: 8.3 seconds
GNU md5sum: 3.9 seconds
openssl dgst -md5: 3.5 seconds
This is clearly better than before (3x openssl), but still slow (2x openssl).
I suspect there is more low-hanging fruit to be had by eliminating the
memcpy in hash_update (maybe not too much - hash_update accounts for
about 4% of total runtime versus 92% for md5_transform according to
perf - but this would also help sha1sum).
make bloatcheck on x86_64 gcc 4.8.2 -Os:
name old new delta
-----------------------------------------------------------------------
md5rot 0 64 64
md5_transform 365 223 -142
-----------------------------------------------------------------------
-78 total
Rationale for the changes:
Move definition of 'rol' up so it can be used in md5_transform. This
is purely cosmetic; it expands to exactly the same code.
Put rotation counts in a lookup table instead of calculating them on
the fly. This is mostly a wash size-wise, +5 bytes total, but
worthwhile for readability and speed.
Instead of accessing the state array using a rotating index (the
variable formerly known as 'a'), access the state with constant
offsets and rotate the contents of the array instead. This is the big
win - it eliminates all the crazy memory addressing math inside the
loop.
|
|
|
|
|
|
Partly because there's no supplied target string ala sprintf, and partly
because I can never remember what order the m and s go in.
|
|
POLL_IN defined as a constant by some libc.
Factor out login.c's change_identity() to xwrap.c as xsetuser().
Replace xsetuid() with xsetuser()
Put a space between argument globals and non-argument globals.
TT starts zeroed, don't need to re-zero entries in it.
STDIN_FILENO has been 0 since 1969, even DOS copied that. Just say 0.
Added an xchroot() using xchdir() to lib/xwrap.c.
Remove endgrent() call until somebody can explain why it was there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(Fix it.)
|
|
for_each_pid_with_name_in_array_perform_callback_function_upon_translated_value() with name_to_pid(), comparing absolute paths or just basename() consistently as spotted by Lukasz Skalski, and adjust callers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requested by LSB
|
|
The <1 has to come first in the option string, normalize whitespace,
sprintf of %d maxes out at -2 billion ala 12 bytes with null terminator so
we don't need a length check in a 4k buffer, use the "%*s" feature of printf
to prepend whitespace for us, take advantage of c99 defining ! to return 0 or 1.
|
|
|