summaryrefslogtreecommitdiffstats
path: root/fsade.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-23 17:13:39 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-24 09:00:51 -0400
commitf1fb3158d3f242f1884d8d8a7473ab0719e93e8c (patch)
tree4ab193109db3da98b779ed807f40adb3bb0b9fbd /fsade.h
parentd9b3196d6c8f4fa0e7d0a4771040762edaebb1ee (diff)
downloadbfs-f1fb3158d3f242f1884d8d8a7473ab0719e93e8c.tar.xz
Implement -xattr predicate
Diffstat (limited to 'fsade.h')
-rw-r--r--fsade.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fsade.h b/fsade.h
index d4e97c0..c9dcfc9 100644
--- a/fsade.h
+++ b/fsade.h
@@ -35,6 +35,8 @@
# endif
#endif
+#define BFS_CAN_CHECK_XATTRS BFS_HAS_SYS_XATTR
+
/**
* Check if a file has a non-trvial Access Control List.
*
@@ -55,4 +57,14 @@ int bfs_check_acl(const struct BFTW *ftwbuf);
*/
int bfs_check_capabilities(const struct BFTW *ftwbuf);
+/**
+ * Check if a file has any extended attributes set.
+ *
+ * @param ftwbuf
+ * The file to check.
+ * @return
+ * 1 if it does, 0 if it doesn't, or -1 if an error occurred.
+ */
+int bfs_check_xattrs(const struct BFTW *ftwbuf);
+
#endif // BFS_FSADE_H