函数逻辑报告

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

函数名称:rpret the buffer as a number to call the set function with

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

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tlen
loff_t *ppos
892  attr等于 needed for tty driver, and maybe others
893  如果非set则返回:负EACCES
896  ret等于mutex_lock_interruptible( & protects access to these buffers )
897  如果ret则返回:ret
900  ret等于负EFAULT
901  size等于两数取小(set_buf的长度 - 1, len)
902  如果copy_from_user(set_buf, buf, size)则转到:out
905  set_buf[size]等于'\0'
906  val等于转换字符串为长整形
907  ret等于set(data, val)
908  如果ret恒等于0则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  返回:ret