Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:memory_read_from_buffer - copy data from the buffer*@to: the kernel 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 buffer* The

Proto:ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, const void *from, size_t available)

Type:ssize_t

Parameter:

TypeParameterName
void *to
size_tcount
loff_t *ppos
const void *from
size_tavailable
718  pos = ppos
720  If pos < 0 Then Return -EINVAL
722  If pos >= available Then Return 0
724  If count > available - pos Then count = available - pos
726  memcpy(to, from + pos, count)
727  ppos = pos + count
729  Return count