函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\seq_buf.c Create Date:2022-07-27 07:12:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:seq_buf_to_user - copy the squence buffer to user space*@s: seq_buf descriptor*@ubuf: The userspace memory location to copy to*@cnt: The amount to copy* Copies the sequence buffer into the userspace memory pointed to* by @ubuf

函数原型:int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, int cnt)

返回类型:int

参数:

类型参数名称
struct seq_buf *s
char __user *ubuf
intcnt
311  如果非cnt则返回:0
314  len等于How much buffer was written?
316  如果len小于等于readpos则返回:负EBUSY
319  len减等于readpos
320  如果cnt大于lencnt等于len
322  ret等于copy_to_user(ubuf, buffer + readpos, cnt)
323  如果ret恒等于cnt则返回:负EFAULT
326  cnt减等于ret
328  readpos加等于cnt
329  返回:cnt
调用者
名称描述
trace_seq_to_userrace_seq_to_user - copy the squence buffer to user space*@s: trace sequence descriptor*@ubuf: The userspace memory location to copy to*@cnt: The amount to copy* Copies the sequence buffer into the userspace memory pointed to* by @ubuf