#!/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 $@