mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/xfs: Add helper to obtain fsxattr field value
This commit adds a helper function to obtain the value of a particular field of an inode's fsxattr fields. Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
b0b379e77d
commit
c25df583e3
@@ -194,6 +194,15 @@ _xfs_get_file_block_size()
|
||||
$XFS_INFO_PROG "$path" | grep realtime | sed -e 's/^.*extsz=\([0-9]*\).*$/\1/g'
|
||||
}
|
||||
|
||||
_xfs_get_fsxattr()
|
||||
{
|
||||
local field="$1"
|
||||
local path="$2"
|
||||
|
||||
local value=$($XFS_IO_PROG -c "stat" "$path" | grep -w "$field")
|
||||
echo ${value##fsxattr.${field} = }
|
||||
}
|
||||
|
||||
# xfs_check script is planned to be deprecated. But, we want to
|
||||
# be able to invoke "xfs_check" behavior in xfstests in order to
|
||||
# maintain the current verification levels.
|
||||
|
||||
Reference in New Issue
Block a user