direct-io.hg
changeset 514:4cd6bdc089bb
bitkeeper revision 1.281 (3f093de6OMoWYaQ83pJoLbC33xt0sA)
This shouldn't have been checked in in the first place...
This shouldn't have been checked in in the first place...
author | sos22@labyrinth.cl.cam.ac.uk |
---|---|
date | Mon Jul 07 09:31:18 2003 +0000 (2003-07-07) |
parents | bb4c013723e9 |
children | 0b00a7979a36 |
files | .rootkeys xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~ |
line diff
1.1 --- a/.rootkeys Mon Jul 07 09:16:15 2003 +0000 1.2 +++ b/.rootkeys Mon Jul 07 09:31:18 2003 +0000 1.3 @@ -507,7 +507,6 @@ 3e5a4e65pP5spJErBW69pJxSSdK9RA xenolinux 1.4 3e67f822FOPwqHiaRKbrskgWgoNL5g xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_block.h 1.5 3e677190SjkzJIvFifRVeYpIZOCtYA xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_ide.c 1.6 3f045897EIYU5l5jxFBpeF1Z0ZOTwA xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c 1.7 -3f045a16wW57GFQ3r3Ta2cJOo1ierQ xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~ 1.8 3e677193nOKKTLJzcAu4SYdbZaia8g xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_scsi.c 1.9 3e676eb5RXnHzSHgA1BvM0B1aIm4qg xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment.c 1.10 3e5d129aDldt6geU2-2SzBae34sQzg xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c
2.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_physdisk_proc.c~ Mon Jul 07 09:16:15 2003 +0000 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,94 +0,0 @@ 2.4 -#include <linux/kernel.h> 2.5 -#include <linux/module.h> 2.6 -#include <linux/fs.h> 2.7 -#include <asm/errno.h> 2.8 -#include <linux/slab.h> 2.9 -#include <asm/hypervisor-ifs/block.h> 2.10 -#include <asm/uaccess.h> 2.11 -#include <linux/proc_fs.h> 2.12 - 2.13 -static struct proc_dir_entry *phd; 2.14 - 2.15 -extern int xenolinux_control_msg(int operration, char *buffer, int size); 2.16 - 2.17 -static ssize_t proc_read_phd(struct file * file, char * buff, size_t size, loff_t * off) 2.18 -{ 2.19 - physdisk_probebuf_t *buf; 2.20 - int res; 2.21 - 2.22 - if (size != sizeof(physdisk_probebuf_t)) 2.23 - return -EINVAL; 2.24 - 2.25 - buf = kmalloc(sizeof(physdisk_probebuf_t), GFP_KERNEL); 2.26 - if (!buf) 2.27 - return -ENOMEM; 2.28 - 2.29 - if (copy_from_user(buf, buff, size)) { 2.30 - kfree(buf); 2.31 - return -EFAULT; 2.32 - } 2.33 - 2.34 - printk("max aces %x\n", buf->n_aces); 2.35 - 2.36 - res = xenolinux_control_msg(XEN_BLOCK_PHYSDEV_PROBE, (void *)buf, 2.37 - sizeof(physdisk_probebuf_t)); 2.38 - 2.39 - printk("max aces %x\n", buf->n_aces); 2.40 - 2.41 - if (res) 2.42 - res = -EINVAL; 2.43 - else { 2.44 - res = sizeof(physdisk_probebuf_t); 2.45 - if (copy_to_user(buff, buf, sizeof(physdisk_probebuf_t))) { 2.46 - res = -EFAULT; 2.47 - } 2.48 - } 2.49 - kfree(buf); 2.50 - return res; 2.51 -} 2.52 - 2.53 -static int proc_write_phd(struct file *file, const char *buffer, 2.54 - size_t count, loff_t *ignore) 2.55 -{ 2.56 - char *local; 2.57 - int res; 2.58 - 2.59 - if (count != sizeof(xp_disk_t)) 2.60 - return -EINVAL; 2.61 - 2.62 - local = kmalloc(count + 1, GFP_KERNEL); 2.63 - if (!local) 2.64 - return -ENOMEM; 2.65 - if (copy_from_user(local, buffer, count)) { 2.66 - res = -EFAULT; 2.67 - goto out; 2.68 - } 2.69 - local[count] = 0; 2.70 - 2.71 - res = xenolinux_control_msg(XEN_BLOCK_PHYSDEV_GRANT, local, count); 2.72 - if (res == 0) 2.73 - res = count; 2.74 - else 2.75 - res = -EINVAL; 2.76 - out: 2.77 - kfree(local); 2.78 - return res; 2.79 -} 2.80 - 2.81 -static struct file_operations proc_phd_fops = { 2.82 - read : proc_read_phd, 2.83 - write : proc_write_phd 2.84 -}; 2.85 - 2.86 -int __init xlphysdisk_proc_init(void) 2.87 -{ 2.88 - phd = create_proc_entry("xeno/dom0/phd", 0644, NULL); 2.89 - if (!phd) { 2.90 - panic("Can\'t create phd proc entry!\n"); 2.91 - } 2.92 - phd->data = NULL; 2.93 - phd->proc_fops = &proc_phd_fops; 2.94 - phd->owner = THIS_MODULE; 2.95 - 2.96 - return 0; 2.97 -}