• Home
  • Raw
  • Download

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()
189 WARN(1, "debugfs file owner did not clean up at exit: %pd", in open_proxy_open()
228 PROTO(struct file *filp, loff_t offset, int whence),
232 PROTO(struct file *filp, char __user *buf, size_t size,
237 PROTO(struct file *filp, const char __user *buf, size_t size,
242 PROTO(struct file *filp, unsigned int cmd, unsigned long arg),
245 static __poll_t full_proxy_poll(struct file *filp, in full_proxy_poll()
261 static int full_proxy_release(struct inode *inode, struct file *filp) in full_proxy_release()
299 static int full_proxy_open(struct inode *inode, struct file *filp) in full_proxy_open()
326 WARN(1, "debugfs file owner did not clean up at exit: %pd", in full_proxy_open()
346 /* No protection against file removal anymore. */ in full_proxy_open()
347 WARN(1, "debugfs file owner replaced proxy fops: %pd", in full_proxy_open()
366 ssize_t debugfs_attr_read(struct file *file, char __user *buf, in debugfs_attr_read() argument
369 struct dentry *dentry = F_DENTRY(file); in debugfs_attr_read()
375 ret = simple_attr_read(file, buf, len, ppos); in debugfs_attr_read()
381 static ssize_t debugfs_attr_write_xsigned(struct file *file, const char __user *buf, in debugfs_attr_write_xsigned() argument
384 struct dentry *dentry = F_DENTRY(file); in debugfs_attr_write_xsigned()
391 ret = simple_attr_write_signed(file, buf, len, ppos); in debugfs_attr_write_xsigned()
393 ret = simple_attr_write(file, buf, len, ppos); in debugfs_attr_write_xsigned()
398 ssize_t debugfs_attr_write(struct file *file, const char __user *buf, in debugfs_attr_write() argument
401 return debugfs_attr_write_xsigned(file, buf, len, ppos, false); in debugfs_attr_write()
405 ssize_t debugfs_attr_write_signed(struct file *file, const char __user *buf, in debugfs_attr_write_signed() argument
408 return debugfs_attr_write_xsigned(file, buf, len, ppos, true); in debugfs_attr_write_signed()
445 * debugfs_create_u8 - create a debugfs file that is used to read and write an unsigned 8-bit value
446 * @name: a pointer to a string containing the name of the file to create.
447 * @mode: the permission that the file should have
448 * @parent: a pointer to the parent dentry for this file. This should be a
450 * file will be created in the root of the debugfs filesystem.
451 * @value: a pointer to the variable that the file should read to and write
454 * This function creates a file in debugfs with the given name that
481 …* debugfs_create_u16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
482 * @name: a pointer to a string containing the name of the file to create.
483 * @mode: the permission that the file should have
484 * @parent: a pointer to the parent dentry for this file. This should be a
486 * file will be created in the root of the debugfs filesystem.
487 * @value: a pointer to the variable that the file should read to and write
490 * This function creates a file in debugfs with the given name that
517 …* debugfs_create_u32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
518 * @name: a pointer to a string containing the name of the file to create.
519 * @mode: the permission that the file should have
520 * @parent: a pointer to the parent dentry for this file. This should be a
522 * file will be created in the root of the debugfs filesystem.
523 * @value: a pointer to the variable that the file should read to and write
526 * This function creates a file in debugfs with the given name that
554 …* debugfs_create_u64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
555 * @name: a pointer to a string containing the name of the file to create.
556 * @mode: the permission that the file should have
557 * @parent: a pointer to the parent dentry for this file. This should be a
559 * file will be created in the root of the debugfs filesystem.
560 * @value: a pointer to the variable that the file should read to and write
563 * This function creates a file in debugfs with the given name that
592 * debugfs_create_ulong - create a debugfs file that is used to read and write
594 * @name: a pointer to a string containing the name of the file to create.
595 * @mode: the permission that the file should have
596 * @parent: a pointer to the parent dentry for this file. This should be a
598 * file will be created in the root of the debugfs filesystem.
599 * @value: a pointer to the variable that the file should read to and write
602 * This function creates a file in debugfs with the given name that
607 * pointer must be passed to the debugfs_remove() function when the file is
644 …* debugfs_create_x{8,16,32,64} - create a debugfs file that is used to read and write an unsigned …
652 * debugfs_create_x8 - create a debugfs file that is used to read and write an unsigned 8-bit value
653 * @name: a pointer to a string containing the name of the file to create.
654 * @mode: the permission that the file should have
655 * @parent: a pointer to the parent dentry for this file. This should be a
657 * file will be created in the root of the debugfs filesystem.
658 * @value: a pointer to the variable that the file should read to and write
670 …* debugfs_create_x16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
671 * @name: a pointer to a string containing the name of the file to create.
672 * @mode: the permission that the file should have
673 * @parent: a pointer to the parent dentry for this file. This should be a
675 * file will be created in the root of the debugfs filesystem.
676 * @value: a pointer to the variable that the file should read to and write
688 …* debugfs_create_x32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
689 * @name: a pointer to a string containing the name of the file to create.
690 * @mode: the permission that the file should have
691 * @parent: a pointer to the parent dentry for this file. This should be a
693 * file will be created in the root of the debugfs filesystem.
694 * @value: a pointer to the variable that the file should read to and write
706 …* debugfs_create_x64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
707 * @name: a pointer to a string containing the name of the file to create.
708 * @mode: the permission that the file should have
709 * @parent: a pointer to the parent dentry for this file. This should be a
711 * file will be created in the root of the debugfs filesystem.
712 * @value: a pointer to the variable that the file should read to and write
740 * debugfs_create_size_t - create a debugfs file that is used to read and write an size_t value
741 * @name: a pointer to a string containing the name of the file to create.
742 * @mode: the permission that the file should have
743 * @parent: a pointer to the parent dentry for this file. This should be a
745 * file will be created in the root of the debugfs filesystem.
746 * @value: a pointer to the variable that the file should read to and write
775 * debugfs_create_atomic_t - create a debugfs file that is used to read and
777 * @name: a pointer to a string containing the name of the file to create.
778 * @mode: the permission that the file should have
779 * @parent: a pointer to the parent dentry for this file. This should be a
781 * file will be created in the root of the debugfs filesystem.
782 * @value: a pointer to the variable that the file should read to and write
793 ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, in debugfs_read_file_bool() argument
799 struct dentry *dentry = F_DENTRY(file); in debugfs_read_file_bool()
804 val = *(bool *)file->private_data; in debugfs_read_file_bool()
817 ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf, in debugfs_write_file_bool() argument
822 bool *val = file->private_data; in debugfs_write_file_bool()
823 struct dentry *dentry = F_DENTRY(file); in debugfs_write_file_bool()
858 * debugfs_create_bool - create a debugfs file that is used to read and write a boolean value
859 * @name: a pointer to a string containing the name of the file to create.
860 * @mode: the permission that the file should have
861 * @parent: a pointer to the parent dentry for this file. This should be a
863 * file will be created in the root of the debugfs filesystem.
864 * @value: a pointer to the variable that the file should read to and write
867 * This function creates a file in debugfs with the given name that
872 * pointer must be passed to the debugfs_remove() function when the file is
888 static ssize_t read_file_blob(struct file *file, char __user *user_buf, in read_file_blob() argument
891 struct debugfs_blob_wrapper *blob = file->private_data; in read_file_blob()
892 struct dentry *dentry = F_DENTRY(file); in read_file_blob()
911 * debugfs_create_blob - create a debugfs file that is used to read a binary blob
912 * @name: a pointer to a string containing the name of the file to create.
913 * @mode: the permission that the file should have
914 * @parent: a pointer to the parent dentry for this file. This should be a
916 * file will be created in the root of the debugfs filesystem.
920 * This function creates a file in debugfs with the given name that exports
925 * pointer must be passed to the debugfs_remove() function when the file is
959 static int u32_array_open(struct inode *inode, struct file *file) in u32_array_open() argument
976 file->private_data = buf; in u32_array_open()
979 return nonseekable_open(inode, file); in u32_array_open()
982 static ssize_t u32_array_read(struct file *file, char __user *buf, size_t len, in u32_array_read() argument
985 size_t size = strlen(file->private_data); in u32_array_read()
988 file->private_data, size); in u32_array_read()
991 static int u32_array_release(struct inode *inode, struct file *file) in u32_array_release() argument
993 kfree(file->private_data); in u32_array_release()
1007 * debugfs_create_u32_array - create a debugfs file that is used to read u32
1009 * @name: a pointer to a string containing the name of the file to create.
1010 * @mode: the permission that the file should have.
1011 * @parent: a pointer to the parent dentry for this file. This should be a
1013 * file will be created in the root of the debugfs filesystem.
1016 * This function creates a file in debugfs with the given name that exports
1018 * Writing is not supported. Seek within the file is also not supported.
1034 * sequential file or create a debugfs file that only prints a regset32.
1083 static int debugfs_open_regset32(struct inode *inode, struct file *file) in debugfs_open_regset32() argument
1085 return single_open(file, debugfs_show_regset32, inode->i_private); in debugfs_open_regset32()
1096 * debugfs_create_regset32 - create a debugfs file that returns register values
1097 * @name: a pointer to a string containing the name of the file to create.
1098 * @mode: the permission that the file should have
1099 * @parent: a pointer to the parent dentry for this file. This should be a
1101 * file will be created in the root of the debugfs filesystem.
1106 * This function creates a file in debugfs with the given name that reports
1125 static int debugfs_devm_entry_open(struct inode *inode, struct file *f) in debugfs_devm_entry_open()
1141 * debugfs_create_devm_seqfile - create a debugfs file that is bound to device.
1143 * @dev: device related to this debugfs file.
1144 * @name: name of the debugfs file.
1145 * @parent: a pointer to the parent dentry for this file. This should be a
1147 * file will be created in the root of the debugfs filesystem.