Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ad from the buffer that is filled with the get function

Proto:ssize_t simple_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tlen
loff_t *ppos
855  attr = needed for tty driver, and maybe others
857  If Not get Then Return -EACCES
860  ret = mutex_lock_interruptible( & protects access to these buffers )
861  If ret Then Return ret
864  If ppos Then
865  size = strlen - Find the length of a string*@s: The string to be sized
866  Else
868  ret = get(data, & val)
869  If ret Then Go to out
872  size = scnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
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  Return ret