162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Squashfs - a compressed read only filesystem for Linux 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2010 662306a36Sopenharmony_ci * Phillip Lougher <phillip@squashfs.org.uk> 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * xattr.h 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#ifdef CONFIG_SQUASHFS_XATTR 1262306a36Sopenharmony_ciextern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64, 1362306a36Sopenharmony_ci u64 *, unsigned int *); 1462306a36Sopenharmony_ciextern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *, 1562306a36Sopenharmony_ci unsigned int *, unsigned long long *); 1662306a36Sopenharmony_ci#else 1762306a36Sopenharmony_cistatic inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb, 1862306a36Sopenharmony_ci u64 start, u64 *xattr_table_start, unsigned int *xattr_ids) 1962306a36Sopenharmony_ci{ 2062306a36Sopenharmony_ci struct squashfs_xattr_id_table *id_table; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci id_table = squashfs_read_table(sb, start, sizeof(*id_table)); 2362306a36Sopenharmony_ci if (IS_ERR(id_table)) 2462306a36Sopenharmony_ci return (__le64 *) id_table; 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci *xattr_table_start = le64_to_cpu(id_table->xattr_table_start); 2762306a36Sopenharmony_ci kfree(id_table); 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci ERROR("Xattrs in filesystem, these will be ignored\n"); 3062306a36Sopenharmony_ci return ERR_PTR(-ENOTSUPP); 3162306a36Sopenharmony_ci} 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_cistatic inline int squashfs_xattr_lookup(struct super_block *sb, 3462306a36Sopenharmony_ci unsigned int index, int *count, unsigned int *size, 3562306a36Sopenharmony_ci unsigned long long *xattr) 3662306a36Sopenharmony_ci{ 3762306a36Sopenharmony_ci return 0; 3862306a36Sopenharmony_ci} 3962306a36Sopenharmony_ci#define squashfs_listxattr NULL 4062306a36Sopenharmony_ci#define squashfs_xattr_handlers NULL 4162306a36Sopenharmony_ci#endif 42