summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c')
-rw-r--r--ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c b/ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c
deleted file mode 100644
index fef20dbc..00000000
--- a/ANDROID_3.4.5/drivers/xen/xenfs/xenstored.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/fs.h>
-
-#include <xen/page.h>
-
-#include "xenfs.h"
-#include "../xenbus/xenbus_comms.h"
-
-static ssize_t xsd_read(struct file *file, char __user *buf,
- size_t size, loff_t *off)
-{
- const char *str = (const char *)file->private_data;
- return simple_read_from_buffer(buf, size, off, str, strlen(str));
-}
-
-static int xsd_release(struct inode *inode, struct file *file)
-{
- kfree(file->private_data);
- return 0;
-}
-
-static int xsd_kva_open(struct inode *inode, struct file *file)
-{
- file->private_data = (void *)kasprintf(GFP_KERNEL, "0x%p",
- xen_store_interface);
- if (!file->private_data)
- return -ENOMEM;
- return 0;
-}
-
-static int xsd_kva_mmap(struct file *file, struct vm_area_struct *vma)
-{
- size_t size = vma->vm_end - vma->vm_start;
-
- if ((size > PAGE_SIZE) || (vma->vm_pgoff != 0))
- return -EINVAL;
-
- if (remap_pfn_range(vma, vma->vm_start,
- virt_to_pfn(xen_store_interface),
- size, vma->vm_page_prot))
- return -EAGAIN;
-
- return 0;
-}
-
-const struct file_operations xsd_kva_file_ops = {
- .open = xsd_kva_open,
- .mmap = xsd_kva_mmap,
- .read = xsd_read,
- .release = xsd_release,
-};
-
-static int xsd_port_open(struct inode *inode, struct file *file)
-{
- file->private_data = (void *)kasprintf(GFP_KERNEL, "%d",
- xen_store_evtchn);
- if (!file->private_data)
- return -ENOMEM;
- return 0;
-}
-
-const struct file_operations xsd_port_file_ops = {
- .open = xsd_port_open,
- .read = xsd_read,
- .release = xsd_release,
-};