Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-28 20:10:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:simple_attr_open is called by an actual attribute open file operation* to set the attribute specific access operations.

Proto:int simple_attr_open(struct inode *inode, struct file *file, int (*get)(void *, u64 *), u64int (*set)(void *, ), const char *fmt)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *file
int (*get
int (*set
const char *fmt
824  attr = Allocation memory
825  If Not attr Then Return -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  Return 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.
Caller
NameDescribe
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