函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:snapshot_write

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

返回类型:ssize_t

参数:

类型参数名称
struct file *filp
const char __user *buf
size_tcount
loff_t *offp
172  pg_offp等于offp按位与PAGE_MASK的反
174  lock_system_sleep()
176  data等于 needed for tty driver, and maybe others
178  如果非pg_offp
179  res等于snapshot_write_next - Get the address to store the next image page.*@handle: Snapshot handle structure to guide the writing.* On the first call, @handle should point to a zeroed snapshot_handle* structure
180  如果res小于等于0则转到:unlock
182  否则
183  res等于PAGE_SIZEpg_offp
186  如果非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)则
187  res等于负EINVAL
188  转到:unlock
191  res等于simple_write_to_buffer(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, & pg_offp, buf, count)
193  如果res大于0则offp加等于res
195  unlock :
196  unlock_system_sleep()
198  返回:res