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 of
SYS_PATH 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 <glaubitz@physik.fu-berlin.de>
---
v2:
- improve phrasing in commit message
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
Ping.--
On 2/9/21 1:10 AM, John Paul Adrian Glaubitz wrote:
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 of
SYS_PATH 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 <glaubitz@physik.fu-berlin.de>
---
v2:
- improve phrasing in commit message
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
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 of
SYS_PATH 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 <glaubitz@physik.fu-berlin.de>
---
v2:
- improve phrasing in commit message
On 2/8/21 4:10 PM, John Paul Adrian Glaubitz wrote:
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 of SYS_PATH 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 <glaubitz@physik.fu-berlin.de>
---
v2:
- improve phrasing in commit message
Applied to powerpc-utils/next branch.
https://github.com/ibm-power-utilities/powerpc-utils/commit/67e974dbb8e4462c69c9c0e3a3b0c3a7219a2d45
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 72:36:50 |
Calls: | 6,657 |
Calls today: | 3 |
Files: | 12,203 |
Messages: | 5,332,305 |
Posted today: | 1 |