Age | Commit message (Collapse) | Author |
|
I came here because the new -Wno-unreachable-code-loop-increment warning
didn't like the for loop on line 86. That loop is indeed not necessary.
Use strend() to do a string suffix match.
Use memmem() to search. It's available on macOS and Android by default,
but it's behind _GNU_SOURCE for glibc, so add that to portability.h.
Output the tags in the same order as the Debian modinfo.
I've left "parmtype" in even though the Debian modinfo doesn't output it
at all.
Also fix the tests so that they work on a device that has modules for
multiple kernels installed (like my laptop) --- make sure that the two
modules we pick come from the same kernel.
|
|
Improve Android support (see code comments).
Remove unnecessary fixed-length limits.
Show error if module not found (plus test).
Expand help text.
Switch to FLAG macro.
Stop hard-coding module assumptions in the tests.
|
|
|
|
|
|
|
|
Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure.
Every use of mmap in toybox was either doing the wrong check, or no check
at all (including the two I personally added).
|
|
line aren't filtered out. Audited all the callers and removed redundant
calls, adjusted call sequence, etc. (And let rm _not_ do this, because posix.)
|
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
to greppable TODO annotations in the individual files. (grep -riw TODO)
|
|
|
|
whitespace tweaks.
|
|
|
|
Add two less-frequently used flags for modinfo; -b specifies an alternate
root and -k replaces the output of uname -r.
Additionally, avoid a potential overflow in sprintf,
and correct an inverted test.
|
|
Don't use xopen() if you want to iterate through multiple files.
Don't abort if unable to open the file, but return error if it can't map it.
(And leak the filehandle.) All modinfo_file() actually uses is the filename,
no reason to go through dirtree() for that. Nothing is actually _checking_ the
return value of modinfo_file(). Avoid global data outside of toy_union.
Make sure extension is at end of file (we can add support for more extensions
later).
|
|
use of a path to a module (*.ko.xz and similar included, but not supported).
|
|
|
|
|
|
module names, so modinfo should too. Made it use mmap() while I was there, and some cosmetic refactoring.
|
|
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
|
|
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
|
|
|