[PATCH] common/rc: add _filter_scratch in _test_inode_flag

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Xiaoli Feng <xifeng@xxxxxxxxxx>

Avoid the invalid failure when the path of file include test flag.

Signed-off-by: Xiaoli Feng <xifeng@xxxxxxxxxx>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index b5a504e0..04080331 100644
--- a/common/rc
+++ b/common/rc
@@ -3069,7 +3069,7 @@ _test_inode_flag()
 	local flag=$1
 	local file=$2
 
-	if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then
+	if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | grep -q "$flag" ; then
 		return 0
 	fi
 	return 1
-- 
2.18.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux