函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_sg_io_hdr

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

返回类型:int

参数:

类型参数名称
struct sg_io_hdr *hdr
const void __user *argp
602  如果in_compat_syscall()则
603  如果copy_from_user( & hdr32, argp, hdr32的长度)则返回:负EFAULT
606  * hdr = (struct sg_io_hdr){ [i] 'S' for SCSI generic (required) = [i] 'S' for SCSI generic (required) , [i] data transfer direction = [i] data transfer direction , [i] SCSI command length = [i] SCSI command length ( <= 16 bytes) , [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 = 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., [i], [*i] points to command to perform = 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., [i], [*o] points to sense_buffer memory = 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., [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 = 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., [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 , }
631  返回:0
635  如果copy_from_user(hdr, argp, hdr的长度)则返回:负EFAULT
638  返回:0
调用者
名称描述
scsi_cmd_ioctl