static void receive_error(struct r3964_info *pInfo, const char flag);
static void on_timeout(unsigned long priv);
static int enable_signals(struct r3964_info *pInfo, pid_t pid, int arg);
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char *buf);
+static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char __user *buf);
static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg,
int error_code, struct r3964_block_header *pBlock);
static struct r3964_message* remove_msg(struct r3964_info *pInfo,
static int r3964_open(struct tty_struct *tty);
static void r3964_close(struct tty_struct *tty);
static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
- unsigned char *buf, size_t nr);
+ unsigned char __user *buf, size_t nr);
static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
- const unsigned char * buf, size_t nr);
+ const unsigned char __user * buf, size_t nr);
static int r3964_ioctl(struct tty_struct * tty, struct file * file,
unsigned int cmd, unsigned long arg);
static void r3964_set_termios(struct tty_struct *tty, struct termios * old);
return 0;
}
-static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char *buf)
+static int read_telegram(struct r3964_info *pInfo, pid_t pid, unsigned char __user *buf)
{
struct r3964_client_info *pClient;
struct r3964_block_header *block;
}
static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
- unsigned char *buf, size_t nr)
+ unsigned char __user *buf, size_t nr)
{
struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
struct r3964_client_info *pClient;
}
static ssize_t r3964_write(struct tty_struct * tty, struct file * file,
- const unsigned char *data, size_t count)
+ const unsigned char __user *data, size_t count)
{
struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data;
struct r3964_block_header *pHeader;
pInfo->flags &= ~R3964_BCC;
return 0;
case R3964_READ_TELEGRAM:
- return read_telegram(pInfo, current->pid, (unsigned char *)arg);
+ return read_telegram(pInfo, current->pid, (unsigned char __user *)arg);
default:
return -ENOIOCTLCMD;
}