aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/squashfs_fs.h
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-16 22:17:04 -0400
committerPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-17 14:54:06 -0400
commitf41d207cbedecd82f797adcce83890aa96f1c9e9 (patch)
tree76322fb62237fe3f5ad65d3c4a74f825e9e016fe /fs/squashfs/squashfs_fs.h
parent4b5397dc24ab12afaac85be3d0863b7f6eb8b0f0 (diff)
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.h19
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 @@
46#define SQUASHFS_NAME_LEN 256 46#define SQUASHFS_NAME_LEN 256
47 47
48#define SQUASHFS_INVALID_FRAG (0xffffffffU) 48#define SQUASHFS_INVALID_FRAG (0xffffffffU)
49#define SQUASHFS_INVALID_XATTR (0xffffffffU)
49#define SQUASHFS_INVALID_BLK (-1LL) 50#define SQUASHFS_INVALID_BLK (-1LL)
50 51
51/* Filesystem flags */ 52/* Filesystem flags */
@@ -96,6 +97,13 @@
96#define SQUASHFS_LFIFO_TYPE 13 97#define SQUASHFS_LFIFO_TYPE 13
97#define SQUASHFS_LSOCKET_TYPE 14 98#define SQUASHFS_LSOCKET_TYPE 14
98 99
100/* Xattr types */
101#define SQUASHFS_XATTR_USER 0
102#define SQUASHFS_XATTR_TRUSTED 1
103#define SQUASHFS_XATTR_SECURITY 2
104#define SQUASHFS_XATTR_VALUE_OOL 256
105#define SQUASHFS_XATTR_PREFIX_MASK 0xff
106
99/* Flag whether block is compressed or uncompressed, bit is set if block is 107/* Flag whether block is compressed or uncompressed, bit is set if block is
100 * uncompressed */ 108 * uncompressed */
101#define SQUASHFS_COMPRESSED_BIT (1 << 15) 109#define SQUASHFS_COMPRESSED_BIT (1 << 15)
@@ -395,6 +403,17 @@ struct squashfs_fragment_entry {
395 unsigned int unused; 403 unsigned int unused;
396}; 404};
397 405
406struct squashfs_xattr_entry {
407 __le16 type;
408 __le16 size;
409 char data[0];
410};
411
412struct squashfs_xattr_val {
413 __le32 vsize;
414 char value[0];
415};
416
398struct squashfs_xattr_id { 417struct squashfs_xattr_id {
399 __le64 xattr; 418 __le64 xattr;
400 __le32 count; 419 __le32 count;