函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-29 10:41:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:simple_attr_open is called by an actual attribute open file operation* to set the attribute specific access operations.

函数原型:int simple_attr_open(struct inode *inode, struct file *file, int (*get)(void *, u64 *), u64int (*set)(void *, ), const char *fmt)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *file
int (*get
int (*set
const char *fmt
824  attr等于开辟内存
825  如果非attr则返回:负ENOMEM
828  get等于get
829  set等于set
830  data等于s or device private pointer
831  rmat for read operation 等于fmt
832  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & protects access to these buffers )
834  needed for tty driver, and maybe others 等于attr
836  返回:This is used by subsystems that don't want seekable* file descriptors. The function is not supposed to ever fail, the only* reason it returns an 'int' and not 'void' is so that it can be plugged* directly into file_operations structure.
调用者
名称描述
unpoison_fops_open
cma_debugfs_fops_open
cma_used_fops_open
cma_maxchunk_fops_open
cma_free_fops_open
cma_alloc_fops_open
fops_errno_open
fei_retval_ops_open