Merge pull request #1552 from mmichal10/fix-mq-req-type-detection

Fix mq req type detection
This commit is contained in:
Robert Baldyga 2024-10-03 15:48:35 +02:00 committed by GitHub
commit 865967e5bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,17 +42,17 @@ check() {
# specific scenario
# Mind the negation in the condition
if ! compile_module $cur_name \
"struct request_queue *q; int y = (int)q->make_request_fn(NULL);" "linux/blkdev.h";
"struct request_queue *q; int y = (int)q->make_request_fn(NULL, NULL);" "linux/blkdev.h";
then
# make_request_fn is of type void
echo $cur_name "3" >> $config_file_path
elif ! compile_module $cur_name \
"struct request_queue *q; blk_qc_t y = q->make_request_fn(NULL);" "linux/blkdev.h";
elif compile_module $cur_name \
"struct request_queue *q; blk_qc_t y = q->make_request_fn(NULL, NULL);" "linux/blkdev.h";
then
# make_request_fn is of type blk_qc_t
echo $cur_name "4" >> $config_file_path
elif ! compile_module $cur_name \
"struct request_queue *q; int y = q->make_request_fn(NULL);" "linux/blkdev.h";
elif compile_module $cur_name \
"struct request_queue *q; int y = q->make_request_fn(NULL, NULL);" "linux/blkdev.h";
then
# make_request_fn is of type int
echo $cur_name "5" >> $config_file_path