setup.sh: fix DRIVER_OVERRIDE behavior.

This wasn't done properly for passing the whole path to a .ko file
previously.

Change-Id: Iabfcda95537003a68f952e4e8e6bcd141d2936f7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/793
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2020-02-11 13:11:05 -07:00 committed by Tomasz Zawadzki
parent 865acf38dc
commit 615b6849b4

View File

@ -174,8 +174,10 @@ function configure_linux_pci {
local driver_path=""
driver_name=""
if [[ -n "${DRIVER_OVERRIDE}" ]]; then
driver_path="${DRIVER_OVERRIDE%/*}"
driver_path="$DRIVER_OVERRIDE"
driver_name="${DRIVER_OVERRIDE##*/}"
# modprobe and the sysfs don't use the .ko suffix.
driver_name=${driver_name%.ko}
# path = name -> there is no path
if [[ "$driver_path" = "$driver_name" ]]; then
driver_path=""