linux/drivers/xen/xenbus/xenbus_dev_frontend.c

/*
 * Driver giving user-space access to the kernel's xenbus connection
 * to xenstore.
 *
 * Copyright (c) 2005, Christian Limpach
 * Copyright (c) 2005, Rusty Russell, IBM Corporation
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation; or, when distributed
 * separately from the Linux kernel or incorporated into other
 * software packages, subject to the following license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 *
 * Changes:
 * 2008-10-07  Alex Zeffertt    Replaced /proc/xen/xenbus with xenfs filesystem
 *                              and /proc/xen compatibility mount point.
 *                              Turned xenfs into a loadable module.
 */

#define pr_fmt(fmt)

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/uio.h>
#include <linux/notifier.h>
#include <linux/wait.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/mount.h>
#include <linux/pagemap.h>
#include <linux/uaccess.h>
#include <linux/init.h>
#include <linux/namei.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/miscdevice.h>
#include <linux/workqueue.h>

#include <xen/xenbus.h>
#include <xen/xen.h>
#include <asm/xen/hypervisor.h>

#include "xenbus.h"

unsigned int xb_dev_generation_id;

/*
 * An element of a list of outstanding transactions, for which we're
 * still waiting a reply.
 */
struct xenbus_transaction_holder {};

/*
 * A buffer of data on the queue.
 */
struct read_buffer {};

struct xenbus_file_priv {};

/* Read out any raw xenbus messages queued up. */
static ssize_t xenbus_file_read(struct file *filp,
			       char __user *ubuf,
			       size_t len, loff_t *ppos)
{}

/*
 * Add a buffer to the queue.  Caller must hold the appropriate lock
 * if the queue is not local.  (Commonly the caller will build up
 * multiple queued buffers on a temporary local list, and then add it
 * to the appropriate list under lock once all the buffers have een
 * successfully allocated.)
 */
static int queue_reply(struct list_head *queue, const void *data, size_t len)
{}

/*
 * Free all the read_buffer s on a list.
 * Caller must have sole reference to list.
 */
static void queue_cleanup(struct list_head *list)
{}

struct watch_adapter {};

static void free_watch_adapter(struct watch_adapter *watch)
{}

static struct watch_adapter *alloc_watch_adapter(const char *path,
						 const char *token)
{}

static void watch_fired(struct xenbus_watch *watch,
			const char *path,
			const char *token)
{}

static void xenbus_worker(struct work_struct *wq)
{}

static void xenbus_file_free(struct kref *kref)
{}

static struct xenbus_transaction_holder *xenbus_get_transaction(
	struct xenbus_file_priv *u, uint32_t tx_id)
{}

void xenbus_dev_queue_reply(struct xb_req_data *req)
{}

static int xenbus_command_reply(struct xenbus_file_priv *u,
				unsigned int msg_type, const char *reply)
{}

static int xenbus_write_transaction(unsigned msg_type,
				    struct xenbus_file_priv *u)
{}

static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
{}

static ssize_t xenbus_file_write(struct file *filp,
				const char __user *ubuf,
				size_t len, loff_t *ppos)
{}

static int xenbus_file_open(struct inode *inode, struct file *filp)
{}

static int xenbus_file_release(struct inode *inode, struct file *filp)
{}

static __poll_t xenbus_file_poll(struct file *file, poll_table *wait)
{}

const struct file_operations xen_xenbus_fops =;
EXPORT_SYMBOL_GPL();

static struct miscdevice xenbus_dev =;

static int __init xenbus_init(void)
{}
device_initcall(xenbus_init);