• 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 ssize_t debugfs_attr_write(struct file *file, const char __user *buf, in debugfs_attr_write() argument
384 struct dentry *dentry = F_DENTRY(file); in debugfs_attr_write()
390 ret = simple_attr_write(file, buf, len, ppos); in debugfs_attr_write()
429 * debugfs_create_u8 - create a debugfs file that is used to read and write an unsigned 8-bit value
430 * @name: a pointer to a string containing the name of the file to create.
431 * @mode: the permission that the file should have
432 * @parent: a pointer to the parent dentry for this file. This should be a
434 * file will be created in the root of the debugfs filesystem.
435 * @value: a pointer to the variable that the file should read to and write
438 * This function creates a file in debugfs with the given name that
465 …* debugfs_create_u16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
466 * @name: a pointer to a string containing the name of the file to create.
467 * @mode: the permission that the file should have
468 * @parent: a pointer to the parent dentry for this file. This should be a
470 * file will be created in the root of the debugfs filesystem.
471 * @value: a pointer to the variable that the file should read to and write
474 * This function creates a file in debugfs with the given name that
501 …* debugfs_create_u32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
502 * @name: a pointer to a string containing the name of the file to create.
503 * @mode: the permission that the file should have
504 * @parent: a pointer to the parent dentry for this file. This should be a
506 * file will be created in the root of the debugfs filesystem.
507 * @value: a pointer to the variable that the file should read to and write
510 * This function creates a file in debugfs with the given name that
538 …* debugfs_create_u64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
539 * @name: a pointer to a string containing the name of the file to create.
540 * @mode: the permission that the file should have
541 * @parent: a pointer to the parent dentry for this file. This should be a
543 * file will be created in the root of the debugfs filesystem.
544 * @value: a pointer to the variable that the file should read to and write
547 * This function creates a file in debugfs with the given name that
576 * debugfs_create_ulong - create a debugfs file that is used to read and write
578 * @name: a pointer to a string containing the name of the file to create.
579 * @mode: the permission that the file should have
580 * @parent: a pointer to the parent dentry for this file. This should be a
582 * file will be created in the root of the debugfs filesystem.
583 * @value: a pointer to the variable that the file should read to and write
586 * This function creates a file in debugfs with the given name that
591 * pointer must be passed to the debugfs_remove() function when the file is
628 …* debugfs_create_x{8,16,32,64} - create a debugfs file that is used to read and write an unsigned …
636 * debugfs_create_x8 - create a debugfs file that is used to read and write an unsigned 8-bit value
637 * @name: a pointer to a string containing the name of the file to create.
638 * @mode: the permission that the file should have
639 * @parent: a pointer to the parent dentry for this file. This should be a
641 * file will be created in the root of the debugfs filesystem.
642 * @value: a pointer to the variable that the file should read to and write
654 …* debugfs_create_x16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
655 * @name: a pointer to a string containing the name of the file to create.
656 * @mode: the permission that the file should have
657 * @parent: a pointer to the parent dentry for this file. This should be a
659 * file will be created in the root of the debugfs filesystem.
660 * @value: a pointer to the variable that the file should read to and write
672 …* debugfs_create_x32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
673 * @name: a pointer to a string containing the name of the file to create.
674 * @mode: the permission that the file should have
675 * @parent: a pointer to the parent dentry for this file. This should be a
677 * file will be created in the root of the debugfs filesystem.
678 * @value: a pointer to the variable that the file should read to and write
690 …* debugfs_create_x64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
691 * @name: a pointer to a string containing the name of the file to create.
692 * @mode: the permission that the file should have
693 * @parent: a pointer to the parent dentry for this file. This should be a
695 * file will be created in the root of the debugfs filesystem.
696 * @value: a pointer to the variable that the file should read to and write
724 * debugfs_create_size_t - create a debugfs file that is used to read and write an size_t value
725 * @name: a pointer to a string containing the name of the file to create.
726 * @mode: the permission that the file should have
727 * @parent: a pointer to the parent dentry for this file. This should be a
729 * file will be created in the root of the debugfs filesystem.
730 * @value: a pointer to the variable that the file should read to and write
759 * debugfs_create_atomic_t - create a debugfs file that is used to read and
761 * @name: a pointer to a string containing the name of the file to create.
762 * @mode: the permission that the file should have
763 * @parent: a pointer to the parent dentry for this file. This should be a
765 * file will be created in the root of the debugfs filesystem.
766 * @value: a pointer to the variable that the file should read to and write
777 ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, in debugfs_read_file_bool() argument
783 struct dentry *dentry = F_DENTRY(file); in debugfs_read_file_bool()
788 val = *(bool *)file->private_data; in debugfs_read_file_bool()
801 ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf, in debugfs_write_file_bool() argument
806 bool *val = file->private_data; in debugfs_write_file_bool()
807 struct dentry *dentry = F_DENTRY(file); in debugfs_write_file_bool()
842 * debugfs_create_bool - create a debugfs file that is used to read and write a boolean value
843 * @name: a pointer to a string containing the name of the file to create.
844 * @mode: the permission that the file should have
845 * @parent: a pointer to the parent dentry for this file. This should be a
847 * file will be created in the root of the debugfs filesystem.
848 * @value: a pointer to the variable that the file should read to and write
851 * This function creates a file in debugfs with the given name that
856 * pointer must be passed to the debugfs_remove() function when the file is
872 static ssize_t read_file_blob(struct file *file, char __user *user_buf, in read_file_blob() argument
875 struct debugfs_blob_wrapper *blob = file->private_data; in read_file_blob()
876 struct dentry *dentry = F_DENTRY(file); in read_file_blob()
895 * debugfs_create_blob - create a debugfs file that is used to read a binary blob
896 * @name: a pointer to a string containing the name of the file to create.
897 * @mode: the permission that the file should have
898 * @parent: a pointer to the parent dentry for this file. This should be a
900 * file will be created in the root of the debugfs filesystem.
904 * This function creates a file in debugfs with the given name that exports
909 * pointer must be passed to the debugfs_remove() function when the file is
943 static int u32_array_open(struct inode *inode, struct file *file) in u32_array_open() argument
960 file->private_data = buf; in u32_array_open()
963 return nonseekable_open(inode, file); in u32_array_open()
966 static ssize_t u32_array_read(struct file *file, char __user *buf, size_t len, in u32_array_read() argument
969 size_t size = strlen(file->private_data); in u32_array_read()
972 file->private_data, size); in u32_array_read()
975 static int u32_array_release(struct inode *inode, struct file *file) in u32_array_release() argument
977 kfree(file->private_data); in u32_array_release()
991 * debugfs_create_u32_array - create a debugfs file that is used to read u32
993 * @name: a pointer to a string containing the name of the file to create.
994 * @mode: the permission that the file should have.
995 * @parent: a pointer to the parent dentry for this file. This should be a
997 * file will be created in the root of the debugfs filesystem.
1000 * This function creates a file in debugfs with the given name that exports
1002 * Writing is not supported. Seek within the file is also not supported.
1018 * sequential file or create a debugfs file that only prints a regset32.
1067 static int debugfs_open_regset32(struct inode *inode, struct file *file) in debugfs_open_regset32() argument
1069 return single_open(file, debugfs_show_regset32, inode->i_private); in debugfs_open_regset32()
1080 * debugfs_create_regset32 - create a debugfs file that returns register values
1081 * @name: a pointer to a string containing the name of the file to create.
1082 * @mode: the permission that the file should have
1083 * @parent: a pointer to the parent dentry for this file. This should be a
1085 * file will be created in the root of the debugfs filesystem.
1090 * This function creates a file in debugfs with the given name that reports
1109 static int debugfs_devm_entry_open(struct inode *inode, struct file *f) in debugfs_devm_entry_open()
1125 * debugfs_create_devm_seqfile - create a debugfs file that is bound to device.
1127 * @dev: device related to this debugfs file.
1128 * @name: name of the debugfs file.
1129 * @parent: a pointer to the parent dentry for this file. This should be a
1131 * file will be created in the root of the debugfs filesystem.