Fix: don't negate posix_fadvise return value to check error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 22:24:20 +0000 (18:24 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 00:33:56 +0000 (20:33 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.c

index 7ce294e815397a9da9f641b18f1dee3019b7916f..6773fbae868af95b5634d0d63d6724519caa7cdf 100644 (file)
@@ -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);
        }
 }
 
This page took 0.027937 seconds and 4 git commands to generate.