X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fring_buffer_vfs.c;h=e5d6a70177467d55555bd125a5a748a78ab7c9de;hb=2df37e95fa4303ecc0db41334452665491533641;hp=f6c0e3dfe21dfc56ee4ee6078bb078c3053c4c79;hpb=9f36eaed6f91d5897924b551b44d1edd8cee00e2;p=lttng-modules.git diff --git a/lib/ringbuffer/ring_buffer_vfs.c b/lib/ringbuffer/ring_buffer_vfs.c index f6c0e3df..e5d6a701 100644 --- a/lib/ringbuffer/ring_buffer_vfs.c +++ b/lib/ringbuffer/ring_buffer_vfs.c @@ -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 * @@ -11,11 +11,11 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include static int put_ulong(unsigned long val, unsigned long arg) { @@ -263,6 +263,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 +417,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; }