diff options
author | Phillip Lougher <phillip@lougher.demon.co.uk> | 2010-05-17 03:17:04 +0100 |
---|---|---|
committer | Phillip Lougher <phillip@lougher.demon.co.uk> | 2010-05-17 19:54:06 +0100 |
commit | f41d207cbedecd82f797adcce83890aa96f1c9e9 (patch) | |
tree | 76322fb62237fe3f5ad65d3c4a74f825e9e016fe /fs/squashfs/squashfs_fs.h | |
parent | 4b5397dc24ab12afaac85be3d0863b7f6eb8b0f0 (diff) | |
download | linux-f41d207cbedecd82f797adcce83890aa96f1c9e9.tar.bz2 |
squashfs: add support for xattr reading
Add support for listxattr and getxattr. Also add xattr definitions.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Diffstat (limited to 'fs/squashfs/squashfs_fs.h')
-rw-r--r-- | fs/squashfs/squashfs_fs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h index c654e863d3c0..6fe940cf9011 100644 --- a/fs/squashfs/squashfs_fs.h +++ b/fs/squashfs/squashfs_fs.h @@ -46,6 +46,7 @@ #define SQUASHFS_NAME_LEN 256 #define SQUASHFS_INVALID_FRAG (0xffffffffU) +#define SQUASHFS_INVALID_XATTR (0xffffffffU) #define SQUASHFS_INVALID_BLK (-1LL) /* Filesystem flags */ @@ -96,6 +97,13 @@ #define SQUASHFS_LFIFO_TYPE 13 #define SQUASHFS_LSOCKET_TYPE 14 +/* Xattr types */ +#define SQUASHFS_XATTR_USER 0 +#define SQUASHFS_XATTR_TRUSTED 1 +#define SQUASHFS_XATTR_SECURITY 2 +#define SQUASHFS_XATTR_VALUE_OOL 256 +#define SQUASHFS_XATTR_PREFIX_MASK 0xff + /* Flag whether block is compressed or uncompressed, bit is set if block is * uncompressed */ #define SQUASHFS_COMPRESSED_BIT (1 << 15) @@ -395,6 +403,17 @@ struct squashfs_fragment_entry { unsigned int unused; }; +struct squashfs_xattr_entry { + __le16 type; + __le16 size; + char data[0]; +}; + +struct squashfs_xattr_val { + __le32 vsize; + char value[0]; +}; + struct squashfs_xattr_id { __le64 xattr; __le32 count; |