diff options
author | Nick Kralevich <nnk@google.com> | 2013-02-07 14:21:34 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-02-20 12:51:09 -0800 |
commit | 4df62f342dbbe2f5cca831ce789dc0426d32ec03 (patch) | |
tree | e98ace44bcfa58e47f95bd321938d6cfd0a044c0 /ext4_utils/ext4_utils.h | |
parent | f070d34601fa2f13e74897253be3a2b3681e4014 (diff) | |
download | extras-4df62f342dbbe2f5cca831ce789dc0426d32ec03.tar.gz |
ext4_utils: add filesystem capabilities support.
Add support for specifying filesystem capabilities when
creating a new filesystem.
The combination of SELinux extended attributes plus
filesystem capability extended attributes is too big
to fit inside one inode entry. Because of this, I added
support to ext4_utils to create an xattr block and link
the inode to that block. We continue to try to fit
everything inside the inode if possible, but fall over to
creating a block if the extended attribute is too big.
Change-Id: I40ebb63975b15ecd8c565486e171b4d50cd4dfaa
Diffstat (limited to 'ext4_utils/ext4_utils.h')
-rw-r--r-- | ext4_utils/ext4_utils.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext4_utils/ext4_utils.h b/ext4_utils/ext4_utils.h index 0d0b6bc9..0a9bd564 100644 --- a/ext4_utils/ext4_utils.h +++ b/ext4_utils/ext4_utils.h @@ -36,6 +36,7 @@ extern "C" { #include <stdlib.h> #include <string.h> #include <setjmp.h> +#include <stdint.h> #if defined(__APPLE__) && defined(__MACH__) #define lseek64 lseek @@ -84,6 +85,12 @@ extern int force; #define __u16 u16 #define __u8 u8 +/* XXX */ +#define cpu_to_le32(x) (x) +#define cpu_to_le16(x) (x) +#define le32_to_cpu(x) (x) +#define le16_to_cpu(x) (x) + typedef unsigned long long u64; typedef signed long long s64; typedef unsigned int u32; @@ -91,6 +98,7 @@ typedef unsigned short int u16; typedef unsigned char u8; struct block_group_info; +struct xattr_list_element; struct ext2_group_desc { __le32 bg_block_bitmap; @@ -130,6 +138,7 @@ struct fs_aux_info { struct ext4_super_block **backup_sb; struct ext2_group_desc *bg_desc; struct block_group_info *bgs; + struct xattr_list_element *xattrs; u32 first_data_block; u64 len_blocks; u32 inode_table_blocks; @@ -171,7 +180,7 @@ void ext4_parse_sb(struct ext4_super_block *sb); u16 ext4_crc16(u16 crc_in, const void *buf, int size); typedef void (*fs_config_func_t)(const char *path, int dir, unsigned *uid, unsigned *gid, - unsigned *mode); + unsigned *mode, uint64_t *capabilities); struct selabel_handle; |