mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
lszfcp: more specific file glob patterns are better for SCSI device list
It's not on the hot path as the glob match is done only once. But there is no point in matching anything but SCSI devices such as "fc_transport" and "subsystem" just to have an additional child process filter it once more. Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
32dbfc4712
commit
a4f4337060
@@ -366,8 +366,8 @@ show_devices()
|
||||
# Differentiate old and new sysfs layout
|
||||
if $FC_CLASS; then
|
||||
SCSI_DEVICE_LIST=`ls -d \
|
||||
$SYSFS/bus/ccw/drivers/zfcp/*/host*/rport*/target*/*/ \
|
||||
2>/dev/null |grep -P '\d+:\d+:\d+:\d+'`
|
||||
$SYSFS/bus/ccw/drivers/zfcp/*/host*/rport*/target*/*:*:*:* \
|
||||
2>/dev/null`
|
||||
else
|
||||
SCSI_DEVICE_LIST=`ls -d $SYSFS/devices/css0/*/*/host[0-9]*/*/`
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user