summaryrefslogtreecommitdiffstats
path: root/fs/squashfs/squashfs_fs.h
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-17 04:17:04 +0200
committerPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-17 20:54:06 +0200
commitf41d207cbedecd82f797adcce83890aa96f1c9e9 (patch)
tree76322fb62237fe3f5ad65d3c4a74f825e9e016fe /fs/squashfs/squashfs_fs.h
parentsquashfs: add xattr id support (diff)
downloadlinux-f41d207cbedecd82f797adcce83890aa96f1c9e9.tar.xz
linux-f41d207cbedecd82f797adcce83890aa96f1c9e9.zip
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 @@
#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;