open-cas-linux/configure.d/1_mq_flags.conf
Michal Mielewczyk e4bc62bd18 Add missing semicolons in configure scripts
Since commit 51dc893fc1 every script must take care about adding a semicolon at
the end of compilable line of code

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-08-11 13:33:31 +02:00

48 lines
849 B
Bash

#!/bin/bash
#
# Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
. $(dirname $3)/conf_framework
check() {
cur_name=$(basename $2)
config_file_path=$1
output=0
if compile_module $cur_name "BLK_MQ_F_STACKING ;" "linux/blk-mq.h"
then
output=1
fi
if compile_module $cur_name "BLK_MQ_F_BLOCKING ;" "linux/blk-mq.h"
then
output=$((output+2))
fi
echo $cur_name $output >> $config_file_path
}
apply() {
arg=$1
if ((arg & 1))
then
add_define "CAS_BLK_MQ_F_STACKING \\
BLK_MQ_F_STACKING"
else
add_define "CAS_BLK_MQ_F_STACKING 0"
fi
if ((arg & 2))
then
add_define "CAS_BLK_MQ_F_BLOCKING \\
BLK_MQ_F_BLOCKING"
else
add_define "CAS_BLK_MQ_F_BLOCKING 0"
fi
}
conf_run $@