Fix: compat ioctl for flush/get metadata version
[lttng-modules.git] / lttng-abi.c
index bdc6c7660601761bc42b999a3e99b5515916e6e2..196aed84e421fa96708e13e247aee2277b255485 100644 (file)
@@ -684,6 +684,21 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
                 */
                return -ENOSYS;
        }
+       case RING_BUFFER_FLUSH:
+       {
+               struct lttng_metadata_stream *stream = filp->private_data;
+               struct lib_ring_buffer *buf = stream->priv;
+               struct channel *chan = buf->backend.chan;
+
+               /*
+                * Before doing the actual ring buffer flush, write up to one
+                * packet of metadata in the ring buffer.
+                */
+               ret = lttng_metadata_output_channel(stream, chan);
+               if (ret < 0)
+                       goto err;
+               break;
+       }
        default:
                break;
        }
This page took 0.025829 seconds and 4 git commands to generate.