#include <asm/uaccess.h>
+#define TAPE_DBF_AREA tape_core_dbf
+
#include "tape.h"
#include "tape_std.h"
#include "tape_class.h"
/*
* file operation structure for tape character frontend
*/
-static ssize_t tapechar_read(struct file *, char *, size_t, loff_t *);
-static ssize_t tapechar_write(struct file *, const char *, size_t, loff_t *);
+static ssize_t tapechar_read(struct file *, char __user *, size_t, loff_t *);
+static ssize_t tapechar_write(struct file *, const char __user *, size_t, loff_t *);
static int tapechar_open(struct inode *,struct file *);
static int tapechar_release(struct inode *,struct file *);
static int tapechar_ioctl(struct inode *, struct file *, unsigned int,
* Tape device read function
*/
ssize_t
-tapechar_read (struct file *filp, char *data, size_t count, loff_t *ppos)
+tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos)
{
struct tape_device *device;
struct tape_request *request;
* Tape device write function
*/
ssize_t
-tapechar_write(struct file *filp, const char *data, size_t count, loff_t *ppos)
+tapechar_write(struct file *filp, const char __user *data, size_t count, loff_t *ppos)
{
struct tape_device *device;
struct tape_request *request;
if (no == MTIOCTOP) {
struct mtop op;
- if (copy_from_user(&op, (char *) data, sizeof(op)) != 0)
+ if (copy_from_user(&op, (char __user *) data, sizeof(op)) != 0)
return -EFAULT;
if (op.mt_count < 0)
return -EINVAL;
if (rc < 0)
return rc;
pos.mt_blkno = rc;
- if (copy_to_user((char *) data, &pos, sizeof(pos)) != 0)
+ if (copy_to_user((char __user *) data, &pos, sizeof(pos)) != 0)
return -EFAULT;
return 0;
}
get.mt_blkno = rc;
}
- if (copy_to_user((char *) data, &get, sizeof(get)) != 0)
+ if (copy_to_user((char __user *) data, &get, sizeof(get)) != 0)
return -EFAULT;
return 0;