Lines Matching refs:file
7 #include <linux/file.h>
123 * an immutable buffer to be attached to a file descriptor.
411 static ssize_t papr_vpd_handle_read(struct file *file, char __user *buf, size_t size, loff_t *off)
413 const struct vpd_blob *blob = file->private_data;
424 static int papr_vpd_handle_release(struct inode *inode, struct file *file)
426 const struct vpd_blob *blob = file->private_data;
433 static loff_t papr_vpd_handle_seek(struct file *file, loff_t off, int whence)
435 const struct vpd_blob *blob = file->private_data;
437 return fixed_size_llseek(file, off, whence, blob->len);
454 * attached to a file descriptor for reading by user space. The memory
455 * backing the blob is freed when the file is released.
468 struct file *file;
488 file = anon_inode_getfile("[papr-vpd]", &papr_vpd_handle_ops,
490 if (IS_ERR(file)) {
491 err = PTR_ERR(file);
495 file->f_mode |= FMODE_LSEEK | FMODE_PREAD;
496 fd_install(fd, file);
508 static long papr_vpd_dev_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)