Merge pull request #79 from robertbaldyga/scsi-init

Init SCSI request properly on newer kernels
This commit is contained in:
Jan Musiał 2019-08-08 10:50:15 +02:00 committed by GitHub
commit 3075772d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,11 +20,22 @@ check() {
apply() { apply() {
case "$1" in case "$1" in
"1") "1")
add_define "cas_blk_rq_set_block_pc(rq) \\ add_function "
blk_rq_set_block_pc(rq)" ;; static inline void cas_blk_rq_set_block_pc(struct request *rq)
{
blk_rq_set_block_pc(rq);
}" ;;
"2") "2")
add_define "cas_blk_rq_set_block_pc(rq) \\ add_function "
{}" ;; #include <linux/blk-mq.h>
#include <scsi/scsi_request.h>
#include <scsi/scsi_cmnd.h>
static inline void cas_blk_rq_set_block_pc(struct request *rq)
{
struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
scsi_req_init(&cmd->req);
}" ;;
*) *)
exit 1 exit 1
esac esac