static ssize_t vhci_write(struct kiocb *iocb, const struct iovec *iov, unsigned long count, loff_t pos) #endif { struct file *file = iocb->ki_filp; struct vhci_data *data = file->private_data; #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) return vhci_get_user(data, from); #else return vhci_get_user(data, iov, count); #endif }
static ssize_t vhci_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) { struct vhci_data *data = file->private_data; return vhci_get_user(data, buf, count); }
static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from) { struct file *file = iocb->ki_filp; struct vhci_data *data = file->private_data; return vhci_get_user(data, from); }
static ssize_t vhci_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) { struct vhci_data *data = file->private_data; if (!access_ok(VERIFY_READ, buf, count)) return -EFAULT; return vhci_get_user(data, buf, count); }