Age | Commit message (Collapse) | Author |
|
|
|
When useradd started using xfork(), the conditional in else if (pid > 0)
became unnecessary, since else means pid is nonzero and xfork makes it
non-negative. However, the "if" was not deleted.
|
|
|
|
|
|
bytes, so we can't globally enable locale without opening stack/heap smashing vulnerabilities. Make commands individually request setlocale() using TOYFLAGS instead.
|
|
|
|
|
|
(It's not like systems implementing -b binary and -t text still matter.)
|
|
|
|
whitespace tweaks.
|
|
While writing tests for cpio, I found that cpio tries to open empty
files if they're regular files, and fails to archive them if unreadable.
This can be easily avoided, and is not the usual behavior.
|
|
- fix problem with sequences at buffer boundaries
- add (ignored) -c and -s options
- don't try to continue with a file when read() fails
|
|
|
|
|
|
WIFEXITED() and WTERMSIG()+127.
|
|
|
|
entry from file.
|
|
|
|
|
|
Sigh. Implement the complex cases and you screw up the simple cases you already tested...
|
|
Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction.
|
|
Simplify the config micromanagement tangle to just a single "interactive"
option. Fix an unused variable and wrong variable type.
|
|
partition table. This is often used on embedded systems booting from SD/USB devices that need to resize partitions on first boot.
|
|
can be used in place of locally defined strtorange() function.
|
|
Since the starting letters are greater than those for 'id' or 'groups',
we cn just check if the first letter is greater than 'i'.
|
|
minor cleanups I had in my tree already.
|
|
|
|
|
|
variable can never actually be used uninitialized but gcc's warning generator can't tell and fails spamwards" warning.
|
|
e.g. Wireless adapter, Bluetooth devices...
|
|
|
|
Renamed the function, missed a user...
|
|
|
|
|
|
|
|
where a SIGCHLD could get lost.
|
|
rename set_sane_term() to reset_term() and have it take the fd it works on as an argument, some whitespace and help text tweaks.
|
|
|
|
|
|
The parsing logic kept checking for other options beyond __pad__ option, without
checking if it was __end__ option after that or not.
|
|
-i is how standard lspci handles changing the PCI ID database.
lspci -n should be a no-op when text is disabled.
|
|
Might have broken something, don't actually have a test case for bootchartd yet.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Not heavily tested yet but should be finished at the design level.
|
|
Remove unnecessary typecasting of things that are already char * to char *,
and multiplying by sizeof(char *) which is 1. Rename do_process() do_flag_a()
since that's the only caller. Move read_key_values() down past trim_spaces()
and read_config_file() so it's next to its only two users. Replace some
euphemisms for 0 with 0.
replace_char() really sounds like something libc should already have one of,
but I'm blanking on it if so. (It doesn't need a temporary variable when the
argument variable is already a copy so changing it won't affect the caller.)
|