configure: Don't append semicolon by default

This allows to pass not only C code, but also preprocessor directives.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2022-08-09 19:41:52 +02:00
parent d460d39374
commit 51dc893fc1
22 changed files with 77 additions and 77 deletions

View File

@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct gendisk *disk = NULL; struct xarray xa; xa = disk->part_tbl" "linux/genhd.h" if compile_module $cur_name "struct gendisk *disk = NULL; struct xarray xa; xa = disk->part_tbl;" "linux/genhd.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct gendisk *disk = NULL; struct disk_part_tbl *ptbl; ptbl = disk->part_tbl" "linux/genhd.h" elif compile_module $cur_name "struct gendisk *disk = NULL; struct disk_part_tbl *ptbl; ptbl = disk->part_tbl;" "linux/genhd.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "dev_t dev; lookup_bdev(\"some_path\", &dev)" "linux/blkdev.h" if compile_module $cur_name "dev_t dev; lookup_bdev(\"some_path\", &dev);" "linux/blkdev.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "lookup_bdev(\"some_path\")" "linux/fs.h" "linux/blkdev.h" elif compile_module $cur_name "lookup_bdev(\"some_path\");" "linux/fs.h" "linux/blkdev.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "lookup_bdev(\"some_path\", 0)" "linux/fs.h" "linux/blkdev.h" elif compile_module $cur_name "lookup_bdev(\"some_path\", 0);" "linux/fs.h" "linux/blkdev.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "bio_clone(NULL, 0)" "linux/bio.h" if compile_module $cur_name "bio_clone(NULL, 0);" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "bio_clone_kmalloc(NULL, 0)" "linux/bio.h" elif compile_module $cur_name "bio_clone_kmalloc(NULL, 0);" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "bio_clone_fast(NULL, 0, NULL)" "linux/bio.h" elif compile_module $cur_name "bio_clone_fast(NULL, 0, NULL);" "linux/bio.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct bio b = {}; bio_dev(&b); b.bi_bdev = NULL" "linux/bio.h" "linux/genhd.h" if compile_module $cur_name "struct bio b = {}; bio_dev(&b); b.bi_bdev = NULL;" "linux/bio.h" "linux/genhd.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct bio b = {}; bio_dev(&b); b.bi_disk = NULL" "linux/bio.h" elif compile_module $cur_name "struct bio b = {}; bio_dev(&b); b.bi_disk = NULL;" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "struct bio b; b.bi_bdev = NULL" "linux/bio.h" elif compile_module $cur_name "struct bio b; b.bi_bdev = NULL;" "linux/bio.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,16 +9,16 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "bio_op(NULL)" "linux/bio.h" if compile_module $cur_name "bio_op(NULL);" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "REQ_OP_MASK" "linux/blk_types.h" elif compile_module $cur_name "REQ_OP_MASK;" "linux/blk_types.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "REQ_OP_DISCARD" "linux/blk_types.h" elif compile_module $cur_name "REQ_OP_DISCARD;" "linux/blk_types.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
elif compile_module $cur_name "REQ_DISCARD" "linux/blk_types.h" elif compile_module $cur_name "REQ_DISCARD;" "linux/blk_types.h"
then then
echo $cur_name "4" >> $config_file_path echo $cur_name "4" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct bio b;b.bi_status" "linux/bio.h" if compile_module $cur_name "struct bio b; b.bi_status;" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct bio b;b.bi_error" "linux/bio.h" elif compile_module $cur_name "struct bio b; b.bi_error;" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "bio_endio(NULL, 0)" "linux/bio.h" elif compile_module $cur_name "bio_endio(NULL, 0);" "linux/bio.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct bio b;b.bi_opf" "linux/bio.h" if compile_module $cur_name "struct bio b; b.bi_opf;" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct bio b;b.bi_rw" "linux/bio.h" elif compile_module $cur_name "struct bio b; b.bi_rw;" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct bio b;b.bi_iter.bi_size" "linux/bio.h" if compile_module $cur_name "struct bio b; b.bi_iter.bi_size;" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct bio b;b.bi_size" "linux/bio.h" elif compile_module $cur_name "struct bio b; b.bi_size;" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "blk_mq_end_request(NULL, 0)" "linux/blk-mq.h" if compile_module $cur_name "blk_mq_end_request(NULL, 0);" "linux/blk-mq.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "blk_end_request_all(NULL, 0)" "linux/blkdev.h" elif compile_module $cur_name "blk_end_request_all(NULL, 0);" "linux/blkdev.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct dentry dentry;dentry.d_u.d_alias" "linux/dcache.h" if compile_module $cur_name "struct dentry dentry; dentry.d_u.d_alias;" "linux/dcache.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct dentry dentry;dentry.d_alias" "linux/dcache.h" elif compile_module $cur_name "struct dentry dentry; dentry.d_alias;" "linux/dcache.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "BIO_FLUSH" "linux/bio.h" if compile_module $cur_name "BIO_FLUSH;" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "REQ_FLUSH" "linux/blk_types.h" elif compile_module $cur_name "REQ_FLUSH;" "linux/blk_types.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "REQ_PREFLUSH" "linux/blk_types.h" elif compile_module $cur_name "REQ_PREFLUSH;" "linux/blk_types.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "global_zone_page_state(1)" "linux/mm.h" if compile_module $cur_name "global_zone_page_state(1);" "linux/mm.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "global_page_state(1)" "linux/mm.h" elif compile_module $cur_name "global_page_state(1);" "linux/mm.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct hlist_node list" "linux/types.h" if compile_module $cur_name "struct hlist_node list;" "linux/types.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct list_head list" "linux/list.h" elif compile_module $cur_name "struct list_head list;" "linux/list.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct file file;file.f_inode" "linux/fs.h" if compile_module $cur_name "struct file file; file.f_inode;" "linux/fs.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct file file;file->f_dentry->d_inode" "linux/fs.h" elif compile_module $cur_name "struct file file; file->f_dentry->d_inode;" "linux/fs.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -10,13 +10,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct queue_limits q;q.limits_aux" "linux/blkdev.h" if compile_module $cur_name "struct queue_limits q; q.limits_aux;" "linux/blkdev.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct queue_limits q;q.max_write_zeroes_sectors" "linux/blkdev.h" elif compile_module $cur_name "struct queue_limits q; q.max_write_zeroes_sectors;" "linux/blkdev.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "struct queue_limits q;q.max_write_same_sectors" "linux/blkdev.h" elif compile_module $cur_name "struct queue_limits q; q.max_write_same_sectors;" "linux/blkdev.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -14,16 +14,16 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "submit_bio(NULL)" "linux/bio.h" if compile_module $cur_name "submit_bio(NULL);" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "submit_bio(NULL)" "linux/fs.h" elif compile_module $cur_name "submit_bio(NULL);" "linux/fs.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "void *t=submit_bio(0, NULL)" "linux/fs.h" elif compile_module $cur_name "void *t=submit_bio(0, NULL);" "linux/fs.h"
then then
echo $cur_name "4" >> $config_file_path echo $cur_name "4" >> $config_file_path
elif compile_module $cur_name "submit_bio(0, NULL)" "linux/fs.h" elif compile_module $cur_name "submit_bio(0, NULL);" "linux/fs.h"
then then
echo $cur_name "4" >> $config_file_path echo $cur_name "4" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "WRITE" "linux/blk_types.h" if compile_module $cur_name "WRITE;" "linux/blk_types.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "REQ_WRITE" "linux/blk_types.h" elif compile_module $cur_name "REQ_WRITE;" "linux/blk_types.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,13 +9,13 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "RQF_SOFTBARRIER" "linux/blkdev.h" if compile_module $cur_name "RQF_SOFTBARRIER;" "linux/blkdev.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "REQ_SOFTBARRIER" "linux/blk_types.h" elif compile_module $cur_name "REQ_SOFTBARRIER;" "linux/blk_types.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "BIO_RW_BARRIER" "linux/fs.h" elif compile_module $cur_name "BIO_RW_BARRIER;" "linux/fs.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "struct bio b;b.bi_end_io(NULL, 0)" "linux/bio.h" if compile_module $cur_name "struct bio b; b.bi_end_io(NULL, 0);" "linux/bio.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct bio b;b.bi_end_io(NULL)" "linux/bio.h" elif compile_module $cur_name "struct bio b; b.bi_end_io(NULL);" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,19 +9,19 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "bio_start_io_acct(NULL)" "linux/blkdev.h" if compile_module $cur_name "bio_start_io_acct(NULL);" "linux/blkdev.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "generic_start_io_acct(NULL, 0, 0, NULL)" "linux/bio.h" elif compile_module $cur_name "generic_start_io_acct(NULL, 0, 0, NULL);" "linux/bio.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "generic_start_io_acct(0, 0, NULL)" "linux/bio.h" elif compile_module $cur_name "generic_start_io_acct(0, 0, NULL);" "linux/bio.h"
then then
echo $cur_name "3" >> $config_file_path echo $cur_name "3" >> $config_file_path
elif compile_module $cur_name "part_round_stats(1, 1)" "linux/genhd.h" elif compile_module $cur_name "part_round_stats(1, 1);" "linux/genhd.h"
then then
echo $cur_name "4" >> $config_file_path echo $cur_name "4" >> $config_file_path
elif compile_module $cur_name "part_round_stats(NULL, 1, 1)" "linux/genhd.h" elif compile_module $cur_name "part_round_stats(NULL, 1, 1);" "linux/genhd.h"
then then
echo $cur_name "5" >> $config_file_path echo $cur_name "5" >> $config_file_path
else else

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright(c) 2012-2021 Intel Corporation # Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
@ -9,10 +9,10 @@
check() { check() {
cur_name=$(basename $2) cur_name=$(basename $2)
config_file_path=$1 config_file_path=$1
if compile_module $cur_name "blk_queue_write_cache(NULL, 0, 0)" "linux/blkdev.h" if compile_module $cur_name "blk_queue_write_cache(NULL, 0, 0);" "linux/blkdev.h"
then then
echo $cur_name "1" >> $config_file_path echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "struct request_queue rq;rq.flush_flags" "linux/blkdev.h" elif compile_module $cur_name "struct request_queue rq; rq.flush_flags;" "linux/blkdev.h"
then then
echo $cur_name "2" >> $config_file_path echo $cur_name "2" >> $config_file_path
else else

View File

@ -48,7 +48,7 @@ compile_module(){
$INCLUDE $INCLUDE
int init_module(void) { int init_module(void) {
$2; $2
return 0; return 0;
} }
void cleanup_module(void) {}; void cleanup_module(void) {};