diff options
author | Elliott Hughes <enh@google.com> | 2017-01-04 10:45:55 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-02-20 21:42:26 -0600 |
commit | 461b90c341090c46083e83ca59ccb88371e051e4 (patch) | |
tree | 98fc3da837953eb5c191c50b7059bbcb7530af3d /lib | |
parent | ac22dfa9c751ca15c2cd90b6a702ebd960b202ee (diff) | |
download | toybox-461b90c341090c46083e83ca59ccb88371e051e4.tar.gz |
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...)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portability.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h index afe02c1c..e0dd914e 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -45,6 +45,10 @@ #define RLIMIT_RTTIME 15 #endif +#ifndef SEEK_DATA +#define SEEK_DATA 3 +#endif + // We don't define GNU_dammit because we're not part of the gnu project, and // don't want to get any FSF on us. Unfortunately glibc (gnu libc) // won't give us Linux syscall wrappers without claiming to be part of the |