mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
lstape: fix to prevent error messages if there are non-zfcp SCSI devices
Assume "N/A" for non-zfcp SCSI devices, such as iSCSI or virtio-scsi-ccw, to not erroneously access absent zfcp-specific sysfs attributes. Signed-off-by: Steffen Maier <maier@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
eba744a25e
commit
4cf8f5f46c
@@ -335,9 +335,13 @@ function SysfsCreateListSCSI()
|
||||
$STATE
|
||||
|
||||
if $VERBOSE; then
|
||||
HBA_ID="N/A"
|
||||
[ -r $SCSI_DEV/hba_id ] && HBA_ID=$(cat $SCSI_DEV/hba_id)
|
||||
WWPN="N/A"
|
||||
[ -r $SCSI_DEV/wwpn ] && WWPN=$(cat $SCSI_DEV/wwpn)
|
||||
printf "$SCSIVFORMAT" \
|
||||
$(cat $SCSI_DEV/hba_id) \
|
||||
$(cat $SCSI_DEV/wwpn) \
|
||||
"$HBA_ID" \
|
||||
"$WWPN" \
|
||||
$TAPE_SERIAL
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user