SYS_PATH, which is required to calculate the plug ID of a SCSI/SATA host in l2of_scsi(), is actually never set in this function but in l2of_vd() where it is not used at all. Thus, move the definition from l2of_vd() to l2of_scsi() to fix the calculation of the plug ID in l2of_scsi().
Fixes: 3fb2c44e22 ("ofpathname: Add support for the plug ID of a SCSI/SATA host") Signed-off-by: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> --- scripts/ofpathname | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ofpathname b/scripts/ofpathname index 2ceae25..906cee9 100755 --- a/scripts/ofpathname +++ b/scripts/ofpathname @@ -573,7 +573,6 @@ l2of_vd() goto_dir $PWD "devspec" OF_PATH=`$CAT $PWD/devspec` - SYS_PATH=$PWD if [[ -z $OF_PATH ]]; then err $ERR_NO_OFPATH fi @@ -807,6 +806,7 @@ l2of_scsi() if [[ -e $PWD/devspec ]]; then OF_PATH=`$CAT $PWD/devspec` + SYS_PATH=$PWD else err $ERR_NO_OFPATH fi -- 2.30.0