aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-11-06 17:26:29 -0500
committerEric Sandeen <sandeen@sandeen.net>2019-11-06 17:26:29 -0500
commit89f0bc44fd697b511200ca27c08b1d2638a6ba50 (patch)
treed05b140a7455c55ac92e6f52b226497b99378171
parent7e8275f8939988f18f9a4a596381ca215fde2270 (diff)
downloadxfsprogs-dev-89f0bc44fd697b511200ca27c08b1d2638a6ba50.tar.gz
xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
For efficient check if file has xattrs. Signed-off-by: Amir Goldstein <amir73il@gmail.com> [sandeen: Add commented-out option to CHATTR_XFLAG_LIST] Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--io/attr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/io/attr.c b/io/attr.c
index b713d0173d..69b32956ab 100644
--- a/io/attr.c
+++ b/io/attr.c
@@ -37,9 +37,10 @@ static struct xflags {
{ FS_XFLAG_FILESTREAM, "S", "filestream" },
{ FS_XFLAG_DAX, "x", "dax" },
{ FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
+ { FS_XFLAG_HASATTR, "X", "has-xattr" },
{ 0, NULL, NULL }
};
-#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"
+#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfSxC"/*X*/
static void
lsattr_help(void)
@@ -65,6 +66,7 @@ lsattr_help(void)
" S -- enable filestreams allocator for this directory\n"
" x -- Use direct access (DAX) for data in this file\n"
" C -- for files with shared blocks, observe the inode CoW extent size value\n"
+" X -- file has extended attributes (cannot be changed using chattr)\n"
"\n"
" Options:\n"
" -R -- recursively descend (useful when current file is a directory)\n"