From a4f43370609e1cafd27d0d8d11cf8ffb1e589c8e Mon Sep 17 00:00:00 2001 From: Steffen Maier Date: Sat, 3 Dec 2022 00:00:13 +0100 Subject: [PATCH] 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 Signed-off-by: Steffen Maier Signed-off-by: Steffen Eiden --- zconf/lszfcp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zconf/lszfcp b/zconf/lszfcp index 7789f135..f741d33b 100755 --- a/zconf/lszfcp +++ b/zconf/lszfcp @@ -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