#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include "privcmd.h"
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
struct privcmd_buf_private { … };
struct privcmd_buf_vma_private { … };
static int privcmd_buf_open(struct inode *ino, struct file *file)
{ … }
static void privcmd_buf_vmapriv_free(struct privcmd_buf_vma_private *vma_priv)
{ … }
static int privcmd_buf_release(struct inode *ino, struct file *file)
{ … }
static void privcmd_buf_vma_open(struct vm_area_struct *vma)
{ … }
static void privcmd_buf_vma_close(struct vm_area_struct *vma)
{ … }
static vm_fault_t privcmd_buf_vma_fault(struct vm_fault *vmf)
{ … }
static const struct vm_operations_struct privcmd_buf_vm_ops = …;
static int privcmd_buf_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
const struct file_operations xen_privcmdbuf_fops = …;
EXPORT_SYMBOL_GPL(…);
struct miscdevice xen_privcmdbuf_dev = …;