aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb/dmesg.c
AgeCommit message (Collapse)Author
2018-12-04Clean up some --help formatting.Elliott Hughes
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
2018-11-17Convert more GLOBALS argument vars to the new single letter code style.Rob Landley
2017-06-09Promote dmesg back to lsb.Rob Landley
2017-02-20Declaring todo bankruptcy, dmesg goes back into pending until I get a chanceRob Landley
to unify the two codepaths in Elliott's rewrite.
2017-02-20Fix dmesg -c and -C.Elliott Hughes
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...)
2016-12-11First cleanup pass on new dmesg.Rob Landley
2016-10-30Implement "dmesg -w".Elliott Hughes
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.
2015-05-03Fix dmesg -c error output.Elliott Hughes
Use perror_exit to show the likely "Operation not permitted" if klogctl fails.
2015-05-03Minor dmesg cleanup.Rob Landley
2015-05-02dmesg: add -t suppress timestamp flagMark Salyzyn
2014-11-25Update dmesg, loosely based on a patch from Elliott Hughes.Rob Landley
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.
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
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.
2012-10-08New build infrastructure to generate FLAG_ macros and TT alias, #define ↵Rob Landley
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.
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley