Move wrapper/ringbuffer to include/ringbuffer
[lttng-modules.git] / lib / ringbuffer / ring_buffer_vfs.c
index f6c0e3dfe21dfc56ee4ee6078bb078c3053c4c79..990006138853bf24fdecdb27ce501da7ff6d84f8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+/* SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
  *
  * ring_buffer_vfs.c
  *
 #include <linux/fs.h>
 #include <linux/compat.h>
 
-#include <wrapper/ringbuffer/backend.h>
-#include <wrapper/ringbuffer/frontend.h>
-#include <wrapper/ringbuffer/vfs.h>
-#include <wrapper/poll.h>
+#include <include/ringbuffer/backend.h>
+#include <include/ringbuffer/frontend.h>
+#include <include/ringbuffer/vfs.h>
 #include <lttng-tracer.h>
 
 static int put_ulong(unsigned long val, unsigned long arg)
@@ -106,7 +105,6 @@ unsigned int lib_ring_buffer_poll(struct file *filp, poll_table *wait,
        int finalized, disabled;
 
        if (filp->f_mode & FMODE_READ) {
-               poll_wait_set_exclusive(wait);
                poll_wait(filp, &buf->read_wait, wait);
 
                finalized = lib_ring_buffer_is_finalized(config, buf);
@@ -263,6 +261,9 @@ long lib_ring_buffer_ioctl(struct file *filp, unsigned int cmd,
        case RING_BUFFER_FLUSH_EMPTY:
                lib_ring_buffer_switch_remote_empty(buf);
                return 0;
+       case RING_BUFFER_CLEAR:
+               lib_ring_buffer_clear(buf);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
@@ -414,6 +415,9 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
        case RING_BUFFER_COMPAT_FLUSH_EMPTY:
                lib_ring_buffer_switch_remote_empty(buf);
                return 0;
+       case RING_BUFFER_COMPAT_CLEAR:
+               lib_ring_buffer_clear(buf);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
This page took 0.024359 seconds and 4 git commands to generate.