/*
- * ring_buffer_vfs.c
+ * ring_buffer_abi.c
*
* Copyright (C) 2009-2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
- * Ring Buffer VFS file operations.
+ * Ring Buffer ABI operations.
*
* Dual LGPL v2.1/GPL v2 license.
*/
#include "backend.h"
#include "frontend.h"
-#include "vfs.h"
+#include <ust/ring-buffer-abi.h>
static int put_ulong(unsigned long val, unsigned long arg)
{
*/
int lib_ring_buffer_open(struct inode *inode, struct file *file)
{
- struct lib_ring_buffer *buf = inode->i_private;
+ struct lttng_ust_lib_ring_buffer *buf = inode->i_private;
int ret;
ret = lib_ring_buffer_open_read(buf);
*/
int lib_ring_buffer_release(struct inode *inode, struct file *file)
{
- struct lib_ring_buffer *buf = file->private_data;
+ struct lttng_ust_lib_ring_buffer *buf = file->private_data;
lib_ring_buffer_release_read(buf);
unsigned int lib_ring_buffer_poll(struct file *filp, poll_table *wait)
{
unsigned int mask = 0;
- struct lib_ring_buffer *buf = filp->private_data;
+ struct lttng_ust_lib_ring_buffer *buf = filp->private_data;
struct channel *chan = buf->backend.chan;
- const struct lib_ring_buffer_config *config = chan->backend.config;
+ const struct lttng_ust_lib_ring_buffer_config *config = chan->backend.config;
int finalized, disabled;
if (filp->f_mode & FMODE_READ) {
*/
long lib_ring_buffer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
- struct lib_ring_buffer *buf = filp->private_data;
+ struct lttng_ust_lib_ring_buffer *buf = filp->private_data;
struct channel *chan = buf->backend.chan;
- const struct lib_ring_buffer_config *config = chan->backend.config;
+ const struct lttng_ust_lib_ring_buffer_config *config = chan->backend.config;
if (lib_ring_buffer_channel_is_disabled(chan))
return -EIO;
arg);
}
case RING_BUFFER_FLUSH:
- lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+ lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE, handle);
return 0;
default:
return -ENOIOCTLCMD;
long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
- struct lib_ring_buffer *buf = filp->private_data;
+ struct lttng_ust_lib_ring_buffer *buf = filp->private_data;
struct channel *chan = buf->backend.chan;
- const struct lib_ring_buffer_config *config = chan->backend.config;
+ const struct lttng_ust_lib_ring_buffer_config *config = chan->backend.config;
if (lib_ring_buffer_channel_is_disabled(chan))
return -EIO;
return put_ulong(read_offset, arg);
}
case RING_BUFFER_FLUSH:
- lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+ lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE, handle);
return 0;
default:
return -ENOIOCTLCMD;
.compat_ioctl = lib_ring_buffer_compat_ioctl,
#endif
};
-EXPORT_SYMBOL_GPL(lib_ring_buffer_file_operations);
-
-MODULE_LICENSE("GPL and additional rights");
-MODULE_AUTHOR("Mathieu Desnoyers");
-MODULE_DESCRIPTION("Ring Buffer Library VFS");