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
618 …* debugfs_create_x{8,16,32,64} - create a debugfs file that is used to read and write an unsigned …
626 * debugfs_create_x8 - create a debugfs file that is used to read and write an unsigned 8-bit value
627 * @name: a pointer to a string containing the name of the file to create.
628 * @mode: the permission that the file should have
629 * @parent: a pointer to the parent dentry for this file. This should be a
631 * file will be created in the root of the debugfs filesystem.
632 * @value: a pointer to the variable that the file should read to and write
644 …* debugfs_create_x16 - create a debugfs file that is used to read and write an unsigned 16-bit val…
645 * @name: a pointer to a string containing the name of the file to create.
646 * @mode: the permission that the file should have
647 * @parent: a pointer to the parent dentry for this file. This should be a
649 * file will be created in the root of the debugfs filesystem.
650 * @value: a pointer to the variable that the file should read to and write
662 …* debugfs_create_x32 - create a debugfs file that is used to read and write an unsigned 32-bit val…
663 * @name: a pointer to a string containing the name of the file to create.
664 * @mode: the permission that the file should have
665 * @parent: a pointer to the parent dentry for this file. This should be a
667 * file will be created in the root of the debugfs filesystem.
668 * @value: a pointer to the variable that the file should read to and write
680 …* debugfs_create_x64 - create a debugfs file that is used to read and write an unsigned 64-bit val…
681 * @name: a pointer to a string containing the name of the file to create.
682 * @mode: the permission that the file should have
683 * @parent: a pointer to the parent dentry for this file. This should be a
685 * file will be created in the root of the debugfs filesystem.
686 * @value: a pointer to the variable that the file should read to and write
714 * debugfs_create_size_t - create a debugfs file that is used to read and write an size_t value
715 * @name: a pointer to a string containing the name of the file to create.
716 * @mode: the permission that the file should have
717 * @parent: a pointer to the parent dentry for this file. This should be a
719 * file will be created in the root of the debugfs filesystem.
720 * @value: a pointer to the variable that the file should read to and write
749 * debugfs_create_atomic_t - create a debugfs file that is used to read and
751 * @name: a pointer to a string containing the name of the file to create.
752 * @mode: the permission that the file should have
753 * @parent: a pointer to the parent dentry for this file. This should be a
755 * file will be created in the root of the debugfs filesystem.
756 * @value: a pointer to the variable that the file should read to and write
767 ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, in debugfs_read_file_bool() argument
773 struct dentry *dentry = F_DENTRY(file); in debugfs_read_file_bool()
778 val = *(bool *)file->private_data; in debugfs_read_file_bool()
790 ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf, in debugfs_write_file_bool() argument
795 bool *val = file->private_data; in debugfs_write_file_bool()
796 struct dentry *dentry = F_DENTRY(file); in debugfs_write_file_bool()
831 * debugfs_create_bool - create a debugfs file that is used to read and write a boolean value
832 * @name: a pointer to a string containing the name of the file to create.
833 * @mode: the permission that the file should have
834 * @parent: a pointer to the parent dentry for this file. This should be a
836 * file will be created in the root of the debugfs filesystem.
837 * @value: a pointer to the variable that the file should read to and write
840 * This function creates a file in debugfs with the given name that
852 ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf, in debugfs_read_file_str() argument
855 struct dentry *dentry = F_DENTRY(file); in debugfs_read_file_str()
864 str = *(char **)file->private_data; in debugfs_read_file_str()
887 static ssize_t debugfs_write_file_str(struct file *file, const char __user *user_buf, in debugfs_write_file_str() argument
914 * debugfs_create_str - create a debugfs file that is used to read and write a string value
915 * @name: a pointer to a string containing the name of the file to create.
916 * @mode: the permission that the file should have
917 * @parent: a pointer to the parent dentry for this file. This should be a
919 * file will be created in the root of the debugfs filesystem.
920 * @value: a pointer to the variable that the file should read to and write
923 * This function creates a file in debugfs with the given name that
928 * pointer must be passed to the debugfs_remove() function when the file is
943 static ssize_t read_file_blob(struct file *file, char __user *user_buf, in read_file_blob() argument
946 struct debugfs_blob_wrapper *blob = file->private_data; in read_file_blob()
947 struct dentry *dentry = F_DENTRY(file); in read_file_blob()
966 * debugfs_create_blob - create a debugfs file that is used to read a binary blob
967 * @name: a pointer to a string containing the name of the file to create.
968 * @mode: the read permission that the file should have (other permissions are
970 * @parent: a pointer to the parent dentry for this file. This should be a
972 * file will be created in the root of the debugfs filesystem.
976 * This function creates a file in debugfs with the given name that exports
981 * pointer must be passed to the debugfs_remove() function when the file is
1015 static int u32_array_open(struct inode *inode, struct file *file) in u32_array_open() argument
1032 file->private_data = buf; in u32_array_open()
1035 return nonseekable_open(inode, file); in u32_array_open()
1038 static ssize_t u32_array_read(struct file *file, char __user *buf, size_t len, in u32_array_read() argument
1041 size_t size = strlen(file->private_data); in u32_array_read()
1044 file->private_data, size); in u32_array_read()
1047 static int u32_array_release(struct inode *inode, struct file *file) in u32_array_release() argument
1049 kfree(file->private_data); in u32_array_release()
1063 * debugfs_create_u32_array - create a debugfs file that is used to read u32
1065 * @name: a pointer to a string containing the name of the file to create.
1066 * @mode: the permission that the file should have.
1067 * @parent: a pointer to the parent dentry for this file. This should be a
1069 * file will be created in the root of the debugfs filesystem.
1072 * This function creates a file in debugfs with the given name that exports
1074 * Writing is not supported. Seek within the file is also not supported.
1090 * sequential file or create a debugfs file that only prints a regset32.
1142 * debugfs_create_regset32 - create a debugfs file that returns register values
1143 * @name: a pointer to a string containing the name of the file to create.
1144 * @mode: the permission that the file should have
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.
1152 * This function creates a file in debugfs with the given name that reports
1171 static int debugfs_devm_entry_open(struct inode *inode, struct file *f) in debugfs_devm_entry_open()
1187 * debugfs_create_devm_seqfile - create a debugfs file that is bound to device.
1189 * @dev: device related to this debugfs file.
1190 * @name: name of the debugfs file.
1191 * @parent: a pointer to the parent dentry for this file. This should be a
1193 * file will be created in the root of the debugfs filesystem.