Age | Commit message (Collapse) | Author |
|
|
|
to unify the two codepaths in Elliott's rewrite.
|
|
I never use these, so I didn't notice I'd broken them until someone who
does bringup complained.
The "one weird trick" with SEEK_DATA is documented at the URL we already
point to. SEEK_DATA was added in Linux 3.1 (2011) and isn't available in
glibc 2.19 (2014), so I've added that to "portability.h" for the benefit
of Ubuntu 14.04.
Also make -c and -C mutually exclusive.
Also fix some of the formatting I introduced earlier. (A clang-format file
would help prevent these mistakes...)
|
|
|
|
Annoyingly, this means writing a new dmesg implementation that uses /dev/kmsg
rather than the klogctl system call. Worse, pre-3.5 kernels don't support
that, so we need to keep the old implementation around as long as we still
care about those kernels.
Since I'm here, add the fancy colors from modern dmesg and the -C flag.
Tested on Nexus 9's 3.10 kernel, an Ubuntu 3.13 kernel, and the
Nexus One's 2.6.35 kernel.
|
|
Use perror_exit to show the likely "Operation not permitted" if klogctl fails.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|