From 615b6849b4ae872403ec54e4c20a0400eadd8861 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Tue, 11 Feb 2020 13:11:05 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/793 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk Reviewed-by: Ben Walker --- scripts/setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index baafe15e1..87157f4a8 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -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=""