OSDN Git Service

Fix dmesg -c and -C.
authorElliott Hughes <enh@google.com>
Wed, 4 Jan 2017 18:45:55 +0000 (10:45 -0800)
committerRob Landley <rob@landley.net>
Tue, 21 Feb 2017 03:42:26 +0000 (21:42 -0600)
commit461b90c341090c46083e83ca59ccb88371e051e4
tree98fc3da837953eb5c191c50b7059bbcb7530af3d
parentac22dfa9c751ca15c2cd90b6a702ebd960b202ee
Fix dmesg -c and -C.

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...)
lib/portability.h
toys/lsb/dmesg.c