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.6.3~9 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8585263fc2526cb0841a8a47e6fb2cf9c30a49ce;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.c b/src/common/consumer.c index 3802eff65..2ab9b2e34 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1255,8 +1255,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); } }