configure: use check_dir for FC and uring
check_dir verifies if the directory exists, if not then exits the script printing an error. Replaced two instances where same steps were done explicitly. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I1179bdea0630ecb1cf2f5d4cde076308145006fb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15712 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
1f59abaebf
commit
c9b4654bd4
10
configure
vendored
10
configure
vendored
@ -858,10 +858,7 @@ fi
|
||||
|
||||
if [[ "${CONFIG[FC]}" = "y" ]]; then
|
||||
if [[ -n "${CONFIG[FC_PATH]}" ]]; then
|
||||
if [ ! -d "${CONFIG[FC_PATH]}" ]; then
|
||||
echo "${CONFIG[FC_PATH]}: directory not found"
|
||||
exit 1
|
||||
fi
|
||||
check_dir "${CONFIG[FC_PATH]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1077,10 +1074,7 @@ fi
|
||||
|
||||
if [[ "${CONFIG[URING]}" = "y" ]]; then
|
||||
if [[ -n "${CONFIG[URING_PATH]}" ]]; then
|
||||
if [ ! -d "${CONFIG[URING_PATH]}" ]; then
|
||||
echo "${CONFIG[URING_PATH]}: directory not found"
|
||||
exit 1
|
||||
fi
|
||||
check_dir "${CONFIG[URING_PATH]}"
|
||||
elif ! echo -e '#include <liburing.h>\nint main(void) { return 0; }\n' \
|
||||
| "${BUILD_CMD[@]}" -luring - 2> /dev/null; then
|
||||
echo "--with-uring requires liburing."
|
||||
|
Loading…
Reference in New Issue
Block a user