configure: more deseralization & cleanup
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
parent
a904a5bf66
commit
0f2ea7ade7
2
configure
vendored
2
configure
vendored
@ -64,8 +64,6 @@ generate_header() {
|
|||||||
source $file "apply" "$CONF" "$file"
|
source $file "apply" "$CONF" "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
wait
|
|
||||||
|
|
||||||
for file in $SECOND; do
|
for file in $SECOND; do
|
||||||
CONF=$(cat ${CONFIG_FILE} | grep $(basename $file) | cut -d' ' -f2)
|
CONF=$(cat ${CONFIG_FILE} | grep $(basename $file) | cut -d' ' -f2)
|
||||||
source $file "apply" "$CONF" "$file"
|
source $file "apply" "$CONF" "$file"
|
||||||
|
@ -15,6 +15,11 @@ check() {
|
|||||||
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"
|
||||||
|
then
|
||||||
|
echo $cur_name "3" >> $config_file_path
|
||||||
|
else
|
||||||
|
echo $cur_name "X" >> $config_file_path
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,6 +31,10 @@ apply() {
|
|||||||
"2")
|
"2")
|
||||||
add_define "CAS_BIO_OP_STATUS(bio) \\
|
add_define "CAS_BIO_OP_STATUS(bio) \\
|
||||||
bio->bi_error" ;;
|
bio->bi_error" ;;
|
||||||
|
"3")
|
||||||
|
# If bio_endio is available, we do not need to provide our own status accessors.
|
||||||
|
# This case-switch prevents false errors during executing 'configure' script.
|
||||||
|
return 0 ;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
@ -12,6 +12,8 @@ check() {
|
|||||||
if compile_module $cur_name "struct bio b;b.bi_write_hint" "linux/bio.h"
|
if compile_module $cur_name "struct bio b;b.bi_write_hint" "linux/bio.h"
|
||||||
then
|
then
|
||||||
echo $cur_name "1" >> $config_file_path
|
echo $cur_name "1" >> $config_file_path
|
||||||
|
else
|
||||||
|
echo $cur_name "2" >> $config_file_path
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,6 +22,8 @@ apply() {
|
|||||||
"1")
|
"1")
|
||||||
add_define "CAS_WLTH_SUPPORT \\
|
add_define "CAS_WLTH_SUPPORT \\
|
||||||
1" ;;
|
1" ;;
|
||||||
|
"2")
|
||||||
|
return 0 ;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
@ -73,10 +73,14 @@ kernel_not_supp_fail() {
|
|||||||
# $2 - path to file with valid configs
|
# $2 - path to file with valid configs
|
||||||
# $3 - name of processed template file
|
# $3 - name of processed template file
|
||||||
conf_run() {
|
conf_run() {
|
||||||
|
local OLD_IFS=$IFS
|
||||||
|
IFS='?'
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"check") check $2 $3;;
|
"check") check $2 $3;;
|
||||||
"apply") apply $2 ;;
|
"apply") apply $2 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
IFS=$OLD_IFS
|
||||||
}
|
}
|
||||||
|
|
||||||
IFS='?'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user