Whamcloud - gitweb
Fix clang warnings on architectures with a 64-bit long
[tools/e2fsprogs.git] / lib / ext2fs / ext4_acl.h
1 /*
2  * Ext4's on-disk acl format.  From linux/fs/ext4/acl.h
3  */
4
5 #define EXT4_ACL_VERSION        0x0001
6
7 /* 23.2.5 acl_tag_t values */
8
9 #define ACL_UNDEFINED_TAG       (0x00)
10 #define ACL_USER_OBJ            (0x01)
11 #define ACL_USER                (0x02)
12 #define ACL_GROUP_OBJ           (0x04)
13 #define ACL_GROUP               (0x08)
14 #define ACL_MASK                (0x10)
15 #define ACL_OTHER               (0x20)
16
17 /* 23.3.6 acl_type_t values */
18
19 #define ACL_TYPE_ACCESS         (0x8000)
20 #define ACL_TYPE_DEFAULT        (0x4000)
21
22 /* 23.2.7 ACL qualifier constants */
23
24 #define ACL_UNDEFINED_ID        ((id_t)-1)
25
26 typedef struct {
27         __le16          e_tag;
28         __le16          e_perm;
29         __le32          e_id;
30  } ext4_acl_entry;
31  
32 typedef struct {
33         __le16          e_tag;
34         __le16          e_perm;
35 } ext4_acl_entry_short;
36
37 typedef struct {
38          __le32          a_version;
39 } ext4_acl_header;
40
41
42 /* Supported ACL a_version fields */
43  #define POSIX_ACL_XATTR_VERSION 0x0002
44
45 typedef struct {
46         __le16                  e_tag;
47         __le16                  e_perm;
48         __le32                  e_id;
49 } posix_acl_xattr_entry;
50
51 typedef struct {
52         __le32                  a_version;
53 #if __GNUC_PREREQ (4, 8)
54 #pragma GCC diagnostic push
55 #pragma GCC diagnostic ignored "-Wpedantic"
56 #endif
57         posix_acl_xattr_entry   a_entries[0];
58 #if __GNUC_PREREQ (4, 8)
59 #pragma GCC diagnostic pop
60 #endif
61 } posix_acl_xattr_header;
62