函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:put_sg_io_hdr

函数原型:int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp)

返回类型:int

参数:

类型参数名称
const struct sg_io_hdr *hdr
void __user *argp
557  如果in_compat_syscall()则
558  struct compat_sg_io_hdr hdr32 = { [i] 'S' for SCSI generic (required) = [i] 'S' for SCSI generic (required) , [i] data transfer direction = [i] data transfer direction , [i] SCSI command length ( <= 16 bytes) = [i] SCSI command length , [i] max length to write to sbp = [i] max length to write to sbp , [i] 0 implies no scatter gather = [i] 0 implies no scatter gather , [i] byte count of data transfer = [i] byte count of data transfer , [i], [*io] points to data transfer memory or scatter gather list = (uintptr_t) [i], [*io] points to data transfer memory or scatter gather list , [i], [*i] points to command to perform = (uintptr_t) [i], [*i] points to command to perform , [i], [*o] points to sense_buffer memory = (uintptr_t) [i], [*o] points to sense_buffer memory , [i] MAX_UINT->no timeout (unit: millisec) = [i] MAX_UINT->no timeout (unit: millisec) , [i] 0 -> default, see SG_FLAG... = [i] 0 -> default, see SG_FLAG... , [i->o] unused internally (normally) = [i->o] unused internally (normally) , [i->o] unused internally = (uintptr_t) [i->o] unused internally , [o] scsi status = [o] scsi status , [o] shifted, masked scsi status = [o] shifted, masked scsi status , [o] messaging level data (optional) = [o] messaging level data (optional) , [o] byte count actually written to sbp = [o] byte count actually written to sbp , [o] errors from host adapter = [o] errors from host adapter , [o] errors from software driver = [o] errors from software driver , [o] dxfer_len - actual_transferred = [o] dxfer_len - actual_transferred , [o] time taken by cmd (unit: millisec) = [o] time taken by cmd (unit: millisec) , [o] auxiliary information = [o] auxiliary information , }
583  如果copy_to_user(argp, & hdr32, hdr32的长度)则返回:负EFAULT
586  返回:0
590  如果copy_to_user(argp, hdr, hdr的长度)则返回:负EFAULT
593  返回:0
调用者
名称描述
scsi_cmd_ioctl