Fix: posix_fadvise wrapper returns -ENOSYS on FreeBSD
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 May 2016 20:05:19 +0000 (16:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 18 May 2016 20:53:23 +0000 (16:53 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.c

index 321703a5157305104f855a3834a55ddf81434bc5..8b8e74c33c3ef8c41e22bd37f73ed45f7521c1e4 100644 (file)
@@ -1265,8 +1265,9 @@ 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) {
-               WARN("posix_fadvise() error (%i)", ret);
+       if (ret && ret != -ENOSYS) {
+               errno = -ret;
+               PERROR("posix_fadvise");
        }
 }
 
This page took 0.027062 seconds and 4 git commands to generate.