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:rpret the buffer as a number to call the set function with

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

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tlen
loff_t *ppos
892  attr = needed for tty driver, and maybe others
893  If Not set Then Return -EACCES
896  ret = mutex_lock_interruptible( & protects access to these buffers )
897  If ret Then Return ret
900  ret = -EFAULT
901  size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( size of set_buf - 1, len)
902  If copy_from_user(set_buf, buf, size) Then Go to out
905  set_buf[size] = '\0'
906  val = simple_strtoll - convert a string to a signed long long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtoll instead.
907  ret = set(data, val)
908  If ret == 0 Then ret = len
910  out :
911  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.
912  Return ret