
Allows for faster configuration in known environments Signed-off-by: Robert Baldyga <robert.baldyga@intel.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
36 lines
553 B
Bash
36 lines
553 B
Bash
#!/bin/bash
|
|
#
|
|
# Copyright(c) 2012-2019 Intel Corporation
|
|
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
#
|
|
|
|
. `dirname $0`/conf_framework
|
|
|
|
check() {
|
|
if compile_module "struct bio b;b.bi_status" "linux/bio.h"
|
|
then
|
|
echo "1"
|
|
elif compile_module "struct bio b;b.bi_error" "linux/bio.h"
|
|
then
|
|
echo "2"
|
|
else
|
|
echo "X"
|
|
fi
|
|
}
|
|
|
|
apply() {
|
|
case "$1" in
|
|
"1")
|
|
add_define "CAS_BIO_OP_STATUS(bio) \\
|
|
bio->bi_status" ;;
|
|
"2")
|
|
add_define "CAS_BIO_OP_STATUS(bio) \\
|
|
bio->bi_error" ;;
|
|
*)
|
|
exit 1
|
|
esac
|
|
}
|
|
|
|
conf_run $@
|
|
|