Commit 9172aae6 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

ioping: warn about unreliable results on poor platforms

Signed-off-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
parent 6c0ec1d8
......@@ -118,7 +118,7 @@ void errx(int eval, const char *fmt, ...)
exit(eval);
}
void warn(const char *fmt, ...)
void warnx(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
......@@ -856,9 +856,15 @@ int main (int argc, char **argv)
flags = O_RDONLY;
#if !defined(HAVE_POSIX_FADVICE) && !defined(HAVE_NOCACHE_IO) && \
defined(HAVE_DIRECT_IO)
#if !defined(HAVE_POSIX_FADVICE) && !defined(HAVE_NOCACHE_IO)
# if defined(HAVE_DIRECT_IO)
direct |= !cached;
# else
if (!cached)
warnx("non-cached I/O not supportted by this platform,"
" results will be unreliable.");
cached = 1;
# endif
#endif
if (write_test) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment