From: Jérémie Galarneau Date: Thu, 19 May 2016 22:24:20 +0000 (-0400) Subject: Fix: don't negate posix_fadvise return value to check error X-Git-Tag: v2.8.0~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=144c7f8a459d0d61e934ab933862d4a75f8d515c;p=lttng-tools.git Fix: don't negate posix_fadvise return value to check error Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index 7ce294e81..6773fbae8 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -1266,8 +1266,8 @@ void lttng_consumer_sync_trace_file(struct lttng_consumer_stream *stream, ret = posix_fadvise(outfd, orig_offset - stream->max_sb_size, stream->max_sb_size, POSIX_FADV_DONTNEED); if (ret && ret != -ENOSYS) { - errno = -ret; - PERROR("posix_fadvise"); + errno = ret; + PERROR("posix_fadvise on fd %i", outfd); } }