Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
|