path: root/btrfs-convert.c
diff options
authorDavid Sterba <>2015-05-04 18:36:21 +0200
committerDavid Sterba <>2015-05-14 15:41:06 +0200
commitab5984ff6cce6f12063720b6dafc1afcd6606853 (patch)
tree78694da95950bc3e8655be94edccf74fff611720 /btrfs-convert.c
parentbea9ba0acb38e8b3a49fa1b38b574dd79bdb1a42 (diff)
btrfs-progs: convert: drop dependency on sys/acl.h
The file sys/acl.h is part of libacl and if the development package is not installed, build of btrfs-convert fails. We do not link against libacl nor use the functions provided by libacl. The ACL_* values are directly read from the extN data, so it's more part of the on-disk format rather than an interface to libacl. The dependency on libacl is completely dropped. Reported-by: Hugo Mills <> Signed-off-by: David Sterba <>
Diffstat (limited to 'btrfs-convert.c')
1 files changed, 14 insertions, 1 deletions
diff --git a/btrfs-convert.c b/btrfs-convert.c
index f9dd7346..9a9d6196 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/acl.h>
#include <fcntl.h>
#include <unistd.h>
#include <uuid/uuid.h>
@@ -692,6 +691,20 @@ static int ext2_xattr_check_entry(struct ext2_ext_attr_entry *entry,
#define EXT2_ACL_VERSION 0x0001
+/* 23.2.5 acl_tag_t values */
+#define ACL_UNDEFINED_TAG (0x00)
+#define ACL_USER_OBJ (0x01)
+#define ACL_USER (0x02)
+#define ACL_GROUP_OBJ (0x04)
+#define ACL_GROUP (0x08)
+#define ACL_MASK (0x10)
+#define ACL_OTHER (0x20)
+/* 23.2.7 ACL qualifier constants */
+#define ACL_UNDEFINED_ID ((id_t)-1)
typedef struct {
__le16 e_tag;
__le16 e_perm;