3 #ifndef _SYSTEM_EXTRAS_EXT4_UTILS_XATTR_H
4 #define _SYSTEM_EXTRAS_EXT4_UTILS_XATTR_H 1
6 #define EXT4_XATTR_MAGIC 0xEA020000
7 #define EXT4_XATTR_INDEX_SECURITY 6
9 struct ext4_xattr_header
{
18 struct ext4_xattr_ibody_header
{
22 struct ext4_xattr_entry
{
32 #define EXT4_XATTR_PAD_BITS 2
33 #define EXT4_XATTR_PAD (1<<EXT4_XATTR_PAD_BITS)
34 #define EXT4_XATTR_ROUND (EXT4_XATTR_PAD-1)
35 #define EXT4_XATTR_LEN(name_len) \
36 (((name_len) + EXT4_XATTR_ROUND + \
37 sizeof(struct ext4_xattr_entry)) & ~EXT4_XATTR_ROUND)
38 #define EXT4_XATTR_NEXT(entry) \
39 ((struct ext4_xattr_entry *)( \
40 (char *)(entry) + EXT4_XATTR_LEN((entry)->e_name_len)))
41 #define EXT4_XATTR_SIZE(size) \
42 (((size) + EXT4_XATTR_ROUND) & ~EXT4_XATTR_ROUND)
43 #define IS_LAST_ENTRY(entry) (*(uint32_t *)(entry) == 0)
45 #endif /* !_SYSTEM_EXTRAS_EXT4_UTILS_XATTR_H */