Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\seq_buf.c Create Date:2022-07-28 06:14:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int seq_buf_to_user(struct seq_buf *s, char __user *ubuf, int cnt)

Type:int

Parameter:

TypeParameterName
struct seq_buf *s
char __user *ubuf
intcnt
311  If Not cnt Then Return 0
314  len = How much buffer was written?
316  If len <= readpos Then Return -EBUSY
319  len -= readpos
320  If cnt > len Then cnt = len
322  ret = copy_to_user(ubuf, buffer + readpos, cnt)
323  If ret == cnt Then Return -EFAULT
326  cnt -= ret
328  readpos += cnt
329  Return cnt