linux/drivers/usb/mon/mon_stat.c

// SPDX-License-Identifier: GPL-2.0
/*
 * The USB Monitor, inspired by Dave Harding's USBMon.
 *
 * This is the 's' or 'stat' reader which debugs usbmon itself.
 * Note that this code blows through locks, so make sure that
 * /dbg/usbmon/0s is well protected from non-root users.
 *
 */

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/usb.h>
#include <linux/fs.h>
#include <linux/uaccess.h>

#include "usb_mon.h"

#define STAT_BUF_SIZE

struct snap {};

static int mon_stat_open(struct inode *inode, struct file *file)
{}

static ssize_t mon_stat_read(struct file *file, char __user *buf,
				size_t nbytes, loff_t *ppos)
{}

static int mon_stat_release(struct inode *inode, struct file *file)
{}

const struct file_operations mon_fops_stat =;