函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:snapshot_compat_ioctl

函数原型:static long snapshot_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

返回类型:long

参数:

类型参数名称
struct file *file
unsigned intcmd
unsigned longarg
407  BUILD_BUG_ON - break compile if a condition is true(sizeof(loff_t) != sizeof(compat_loff_t))
410  :cmd恒等于SNAPSHOT_GET_IMAGE_SIZE
411  :cmd恒等于SNAPSHOT_AVAIL_SWAP_SIZE
412  :cmd恒等于SNAPSHOT_ALLOC_SWAP_PAGE
413  __useruoffset等于A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
418  old_fs等于获取当前进程地址空间上限()
419  设置寄存器值(fs)
420  err等于snapshot_ioctl(file, cmd, (unsignedlong) & offset)
421  设置寄存器值(fs)
422  如果非errput_user - Write a simple value into user space(offset, uoffset)则err等于负EFAULT
424  返回:err
427  :cmd恒等于SNAPSHOT_CREATE_IMAGE
428  返回:snapshot_ioctl(file, cmd, (unsignedlong)A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.)
431  :cmd恒等于SNAPSHOT_SET_SWAP_AREA
432  __useru_swap_area等于A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
438  err等于Careful: we have to cast the result to the type of the pointer* for sign reasons(offset, & offset)
439  err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons(dev, & dev)
440  如果err则返回:负EFAULT
442  old_fs等于获取当前进程地址空间上限()
443  设置寄存器值(fs)
444  err等于snapshot_ioctl(file, SNAPSHOT_SET_SWAP_AREA, (unsignedlong) & swap_area)
446  设置寄存器值(fs)
447  返回:err
450  默认
451  返回:snapshot_ioctl(file, cmd, arg)