函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:snapshot_read

函数原型:static ssize_t snapshot_read(struct file *filp, char __user *buf, size_t count, loff_t *offp)

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
char __user *buf
size_tcount
loff_t *offp
139  pg_offp等于offp按位与PAGE_MASK的反
141  lock_system_sleep()
143  data等于 needed for tty driver, and maybe others
144  如果非ready
145  res等于负ENODATA
146  转到:Unlock
148  如果非pg_offp
149  res等于snapshot_read_next - Get the address to read the next image page from.*@handle: Snapshot handle to be used for the reading.* On the first call, @handle should point to a zeroed snapshot_handle* structure
150  如果res小于等于0则转到:Unlock
152  否则
153  res等于PAGE_SIZEpg_offp
156  res等于simple_read_from_buffer(buf, count, & pg_offp, This macro returns the address from/to which the caller of* snapshot_read_next()/snapshot_write_next() is allowed to* read/write data after the function returns(handle), res)
158  如果res大于0则offp加等于res
161  Unlock :
162  unlock_system_sleep()
164  返回:res