函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bsg_scsi_fill_hdr

函数原型:static int bsg_scsi_fill_hdr(struct request *rq, struct sg_io_v4 *hdr, fmode_t mode)

返回类型:int

参数:

类型参数名称
struct request *rq
struct sg_io_v4 *hdr
fmode_tmode
68  sreq等于scsi_req(rq)
70  如果 [i] bytes to be transferred to device [i] bytes to be transferred from device
71  pr_warn_once("BIDI support in bsg has been removed.\n")
72  返回:负EOPNOTSUPP
75  cmd_len等于 [i] in bytes
76  如果cmd_len大于BLK_MAX_CDB
77  cmd等于分配内存并置零
78  如果非cmd则返回:负ENOMEM
82  如果copy_from_user(cmd, uptr64( [i], [*i] {SCSI: cdb} ), cmd_len)则返回:负EFAULT
84  如果blk_verify_command(cmd, mode)则返回:负EPERM
86  返回:0