Lines Matching full:file

3  *  file.c - part of debugfs, a tiny little debug file system
29 static ssize_t default_read_file(struct file *file, char __user *buf, in default_read_file() argument
35 static ssize_t default_write_file(struct file *file, const char __user *buf, in default_write_file() argument
50 const struct file_operations *debugfs_real_fops(const struct file *filp) in debugfs_real_fops()
68 * debugfs_file_get - mark the beginning of file data access
72 * into the file removing functions debugfs_remove() and
74 * file data may only get freed after a successful return of any of
78 * If -%EIO is returned, the file has already been removed and thus,
80 * it is allowed to access the file data, zero is returned.
124 * debugfs_file_put - mark the end of file data access
143 * We also need to exclude any file that has ways to write or alter it as root
147 struct file *filp, in debugfs_locked_down()
163 static int open_proxy_open(struct inode *inode, struct file *filp) in open_proxy_open()
187 WARN(1, "debugfs file owner did not clean up at exit: %pd", in open_proxy_open()
226 PROTO(struct file *filp, loff_t offset, int whence),
230 PROTO(struct file *filp, char __user *buf, size_t size,
235 PROTO(struct file *filp, const char __user *buf, size_t size,
240 PROTO(struct file *filp, unsigned int cmd, unsigned long arg),
243 static __poll_t full_proxy_poll(struct file *filp, in full_proxy_poll()
259 static int full_proxy_release(struct inode *inode, struct file *filp) in full_proxy_release()
297 static int full_proxy_open(struct inode *inode, struct file *filp) in full_proxy_open()
322 WARN(1, "debugfs file owner did not clean up at exit: %pd", in full_proxy_open()
342 /* No protection against file removal anymore. */ in full_proxy_open()
343 WARN(1, "debugfs file owner replaced proxy fops: %pd", in full_proxy_open()
362 ssize_t debugfs_attr_read(struct file *file, char __user *buf, in debugfs_attr_read() argument
365 struct dentry *dentry = F_DENTRY(file); in debugfs_attr_read()
371 ret = simple_attr_read(file, buf, len, ppos); in debugfs_attr_read()
377 ssize_t debugfs_attr_write(struct file *file, const char __user *buf, in debugfs_attr_write() argument
380 struct dentry *dentry = F_DENTRY(file); in debugfs_attr_write()
386 ret = simple_attr_write(file, buf, len, ppos); in debugfs_attr_write()
425 * debugfs_create_u8 - create a debugfs file that is used to read and write an unsigned 8-bit value
426 * @name: a pointer to a string containing the name of the file to create.
427 * @mode: the permission that the file should have
428 * @parent: a pointer to the parent dentry for this file. This should be a
430 * file will be created in the root of the debugfs filesystem.
431 * @value: a pointer to the variable that the file should read to and write
434 * This function creates a file in debugfs with the given name that
461 …* debugfs_create_u16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
462 * @name: a pointer to a string containing the name of the file to create.
463 * @mode: the permission that the file should have
464 * @parent: a pointer to the parent dentry for this file. This should be a
466 * file will be created in the root of the debugfs filesystem.
467 * @value: a pointer to the variable that the file should read to and write
470 * This function creates a file in debugfs with the given name that
497 …* debugfs_create_u32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
498 * @name: a pointer to a string containing the name of the file to create.
499 * @mode: the permission that the file should have
500 * @parent: a pointer to the parent dentry for this file. This should be a
502 * file will be created in the root of the debugfs filesystem.
503 * @value: a pointer to the variable that the file should read to and write
506 * This function creates a file in debugfs with the given name that
534 …* debugfs_create_u64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
535 * @name: a pointer to a string containing the name of the file to create.
536 * @mode: the permission that the file should have
537 * @parent: a pointer to the parent dentry for this file. This should be a
539 * file will be created in the root of the debugfs filesystem.
540 * @value: a pointer to the variable that the file should read to and write
543 * This function creates a file in debugfs with the given name that
572 * debugfs_create_ulong - create a debugfs file that is used to read and write
574 * @name: a pointer to a string containing the name of the file to create.
575 * @mode: the permission that the file should have
576 * @parent: a pointer to the parent dentry for this file. This should be a
578 * file will be created in the root of the debugfs filesystem.
579 * @value: a pointer to the variable that the file should read to and write
582 * This function creates a file in debugfs with the given name that
587 * pointer must be passed to the debugfs_remove() function when the file is
624 …* debugfs_create_x{8,16,32,64} - create a debugfs file that is used to read and write an unsigned …
632 * debugfs_create_x8 - create a debugfs file that is used to read and write an unsigned 8-bit value
633 * @name: a pointer to a string containing the name of the file to create.
634 * @mode: the permission that the file should have
635 * @parent: a pointer to the parent dentry for this file. This should be a
637 * file will be created in the root of the debugfs filesystem.
638 * @value: a pointer to the variable that the file should read to and write
650 …* debugfs_create_x16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
651 * @name: a pointer to a string containing the name of the file to create.
652 * @mode: the permission that the file should have
653 * @parent: a pointer to the parent dentry for this file. This should be a
655 * file will be created in the root of the debugfs filesystem.
656 * @value: a pointer to the variable that the file should read to and write
668 …* debugfs_create_x32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
669 * @name: a pointer to a string containing the name of the file to create.
670 * @mode: the permission that the file should have
671 * @parent: a pointer to the parent dentry for this file. This should be a
673 * file will be created in the root of the debugfs filesystem.
674 * @value: a pointer to the variable that the file should read to and write
686 …* debugfs_create_x64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
687 * @name: a pointer to a string containing the name of the file to create.
688 * @mode: the permission that the file should have
689 * @parent: a pointer to the parent dentry for this file. This should be a
691 * file will be created in the root of the debugfs filesystem.
692 * @value: a pointer to the variable that the file should read to and write
720 * debugfs_create_size_t - create a debugfs file that is used to read and write an size_t value
721 * @name: a pointer to a string containing the name of the file to create.
722 * @mode: the permission that the file should have
723 * @parent: a pointer to the parent dentry for this file. This should be a
725 * file will be created in the root of the debugfs filesystem.
726 * @value: a pointer to the variable that the file should read to and write
755 * debugfs_create_atomic_t - create a debugfs file that is used to read and
757 * @name: a pointer to a string containing the name of the file to create.
758 * @mode: the permission that the file should have
759 * @parent: a pointer to the parent dentry for this file. This should be a
761 * file will be created in the root of the debugfs filesystem.
762 * @value: a pointer to the variable that the file should read to and write
773 ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, in debugfs_read_file_bool() argument
779 struct dentry *dentry = F_DENTRY(file); in debugfs_read_file_bool()
784 val = *(bool *)file->private_data; in debugfs_read_file_bool()
797 ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf, in debugfs_write_file_bool() argument
802 bool *val = file->private_data; in debugfs_write_file_bool()
803 struct dentry *dentry = F_DENTRY(file); in debugfs_write_file_bool()
838 * debugfs_create_bool - create a debugfs file that is used to read and write a boolean value
839 * @name: a pointer to a string containing the name of the file to create.
840 * @mode: the permission that the file should have
841 * @parent: a pointer to the parent dentry for this file. This should be a
843 * file will be created in the root of the debugfs filesystem.
844 * @value: a pointer to the variable that the file should read to and write
847 * This function creates a file in debugfs with the given name that
852 * pointer must be passed to the debugfs_remove() function when the file is
868 static ssize_t read_file_blob(struct file *file, char __user *user_buf, in read_file_blob() argument
871 struct debugfs_blob_wrapper *blob = file->private_data; in read_file_blob()
872 struct dentry *dentry = F_DENTRY(file); in read_file_blob()
891 * debugfs_create_blob - create a debugfs file that is used to read a binary blob
892 * @name: a pointer to a string containing the name of the file to create.
893 * @mode: the permission that the file should have
894 * @parent: a pointer to the parent dentry for this file. This should be a
896 * file will be created in the root of the debugfs filesystem.
900 * This function creates a file in debugfs with the given name that exports
905 * pointer must be passed to the debugfs_remove() function when the file is
939 static int u32_array_open(struct inode *inode, struct file *file) in u32_array_open() argument
956 file->private_data = buf; in u32_array_open()
959 return nonseekable_open(inode, file); in u32_array_open()
962 static ssize_t u32_array_read(struct file *file, char __user *buf, size_t len, in u32_array_read() argument
965 size_t size = strlen(file->private_data); in u32_array_read()
968 file->private_data, size); in u32_array_read()
971 static int u32_array_release(struct inode *inode, struct file *file) in u32_array_release() argument
973 kfree(file->private_data); in u32_array_release()
987 * debugfs_create_u32_array - create a debugfs file that is used to read u32
989 * @name: a pointer to a string containing the name of the file to create.
990 * @mode: the permission that the file should have.
991 * @parent: a pointer to the parent dentry for this file. This should be a
993 * file will be created in the root of the debugfs filesystem.
996 * This function creates a file in debugfs with the given name that exports
998 * Writing is not supported. Seek within the file is also not supported.
1014 * sequential file or create a debugfs file that only prints a regset32.
1063 static int debugfs_open_regset32(struct inode *inode, struct file *file) in debugfs_open_regset32() argument
1065 return single_open(file, debugfs_show_regset32, inode->i_private); in debugfs_open_regset32()
1076 * debugfs_create_regset32 - create a debugfs file that returns register values
1077 * @name: a pointer to a string containing the name of the file to create.
1078 * @mode: the permission that the file should have
1079 * @parent: a pointer to the parent dentry for this file. This should be a
1081 * file will be created in the root of the debugfs filesystem.
1086 * This function creates a file in debugfs with the given name that reports
1105 static int debugfs_devm_entry_open(struct inode *inode, struct file *f) in debugfs_devm_entry_open()
1121 * debugfs_create_devm_seqfile - create a debugfs file that is bound to device.
1123 * @dev: device related to this debugfs file.
1124 * @name: name of the debugfs file.
1125 * @parent: a pointer to the parent dentry for this file. This should be a
1127 * file will be created in the root of the debugfs filesystem.