xref: /openbmc/linux/fs/squashfs/xattr.h (revision d7f2ff67)
101e5b4e4SPhillip Lougher /*
201e5b4e4SPhillip Lougher  * Squashfs - a compressed read only filesystem for Linux
301e5b4e4SPhillip Lougher  *
401e5b4e4SPhillip Lougher  * Copyright (c) 2010
5d7f2ff67SPhillip Lougher  * Phillip Lougher <phillip@squashfs.org.uk>
601e5b4e4SPhillip Lougher  *
701e5b4e4SPhillip Lougher  * This program is free software; you can redistribute it and/or
801e5b4e4SPhillip Lougher  * modify it under the terms of the GNU General Public License
901e5b4e4SPhillip Lougher  * as published by the Free Software Foundation; either version 2,
1001e5b4e4SPhillip Lougher  * or (at your option) any later version.
1101e5b4e4SPhillip Lougher  *
1201e5b4e4SPhillip Lougher  * This program is distributed in the hope that it will be useful,
1301e5b4e4SPhillip Lougher  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1401e5b4e4SPhillip Lougher  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1501e5b4e4SPhillip Lougher  * GNU General Public License for more details.
1601e5b4e4SPhillip Lougher  *
1701e5b4e4SPhillip Lougher  * You should have received a copy of the GNU General Public License
1801e5b4e4SPhillip Lougher  * along with this program; if not, write to the Free Software
1901e5b4e4SPhillip Lougher  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2001e5b4e4SPhillip Lougher  *
2101e5b4e4SPhillip Lougher  * xattr.h
2201e5b4e4SPhillip Lougher  */
2301e5b4e4SPhillip Lougher 
24637d5c9aSPhillip Lougher #ifdef CONFIG_SQUASHFS_XATTR
2501e5b4e4SPhillip Lougher extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
2601e5b4e4SPhillip Lougher 		u64 *, int *);
2701e5b4e4SPhillip Lougher extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
285f3b321dSPhillip Lougher 		unsigned int *, unsigned long long *);
2901e5b4e4SPhillip Lougher #else
3001e5b4e4SPhillip Lougher static inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb,
3101e5b4e4SPhillip Lougher 		u64 start, u64 *xattr_table_start, int *xattr_ids)
3201e5b4e4SPhillip Lougher {
3301e5b4e4SPhillip Lougher 	ERROR("Xattrs in filesystem, these will be ignored\n");
3437986f63SPhillip Lougher 	*xattr_table_start = start;
3501e5b4e4SPhillip Lougher 	return ERR_PTR(-ENOTSUPP);
3601e5b4e4SPhillip Lougher }
3701e5b4e4SPhillip Lougher 
3801e5b4e4SPhillip Lougher static inline int squashfs_xattr_lookup(struct super_block *sb,
395f3b321dSPhillip Lougher 		unsigned int index, int *count, unsigned int *size,
40aa5b1894SStephen Hemminger 		unsigned long long *xattr)
4101e5b4e4SPhillip Lougher {
4201e5b4e4SPhillip Lougher 	return 0;
4301e5b4e4SPhillip Lougher }
4401e5b4e4SPhillip Lougher #define squashfs_listxattr NULL
4501e5b4e4SPhillip Lougher #define generic_getxattr NULL
4601e5b4e4SPhillip Lougher #define squashfs_xattr_handlers NULL
4701e5b4e4SPhillip Lougher #endif
48