函数逻辑报告

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

函数名称:ad from the buffer that is filled with the get function

函数原型:ssize_t simple_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tlen
loff_t *ppos
855  attr等于 needed for tty driver, and maybe others
857  如果非get则返回:负EACCES
860  ret等于mutex_lock_interruptible( & protects access to these buffers )
861  如果ret则返回:ret
864  如果ppos
865  size等于strlen - Find the length of a string*@s: The string to be sized
866  否则
868  ret等于get(data, & val)
869  如果ret则转到:out
872  size等于格式化输出字符串
876  ret等于simple_read_from_buffer - copy data from the buffer to user space*@to: the user space buffer to read to*@count: the maximum number of bytes to read*@ppos: the current position in the buffer*@from: the buffer to read from*@available: the size of the
877  out :
878  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
879  返回:ret