xref: /openbmc/linux/fs/squashfs/xattr.h (revision 68252eb5f8413a5bdaac8644be9067916e58df8c)
1*68252eb5SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
201e5b4e4SPhillip Lougher /*
301e5b4e4SPhillip Lougher  * Squashfs - a compressed read only filesystem for Linux
401e5b4e4SPhillip Lougher  *
501e5b4e4SPhillip Lougher  * Copyright (c) 2010
6d7f2ff67SPhillip Lougher  * Phillip Lougher <phillip@squashfs.org.uk>
701e5b4e4SPhillip Lougher  *
801e5b4e4SPhillip Lougher  * xattr.h
901e5b4e4SPhillip Lougher  */
1001e5b4e4SPhillip Lougher 
11637d5c9aSPhillip Lougher #ifdef CONFIG_SQUASHFS_XATTR
1201e5b4e4SPhillip Lougher extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
1301e5b4e4SPhillip Lougher 		u64 *, int *);
1401e5b4e4SPhillip Lougher extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
155f3b321dSPhillip Lougher 		unsigned int *, unsigned long long *);
1601e5b4e4SPhillip Lougher #else
1701e5b4e4SPhillip Lougher static inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb,
1801e5b4e4SPhillip Lougher 		u64 start, u64 *xattr_table_start, int *xattr_ids)
1901e5b4e4SPhillip Lougher {
2001e5b4e4SPhillip Lougher 	ERROR("Xattrs in filesystem, these will be ignored\n");
2137986f63SPhillip Lougher 	*xattr_table_start = start;
2201e5b4e4SPhillip Lougher 	return ERR_PTR(-ENOTSUPP);
2301e5b4e4SPhillip Lougher }
2401e5b4e4SPhillip Lougher 
2501e5b4e4SPhillip Lougher static inline int squashfs_xattr_lookup(struct super_block *sb,
265f3b321dSPhillip Lougher 		unsigned int index, int *count, unsigned int *size,
27aa5b1894SStephen Hemminger 		unsigned long long *xattr)
2801e5b4e4SPhillip Lougher {
2901e5b4e4SPhillip Lougher 	return 0;
3001e5b4e4SPhillip Lougher }
3101e5b4e4SPhillip Lougher #define squashfs_listxattr NULL
3201e5b4e4SPhillip Lougher #define squashfs_xattr_handlers NULL
3301e5b4e4SPhillip Lougher #endif
34