xattr.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Squashfs - a compressed read only filesystem for Linux
  4. *
  5. * Copyright (c) 2010
  6. * Phillip Lougher <[email protected]>
  7. *
  8. * xattr.h
  9. */
  10. #ifdef CONFIG_SQUASHFS_XATTR
  11. extern __le64 *squashfs_read_xattr_id_table(struct super_block *, u64,
  12. u64 *, unsigned int *);
  13. extern int squashfs_xattr_lookup(struct super_block *, unsigned int, int *,
  14. unsigned int *, unsigned long long *);
  15. #else
  16. static inline __le64 *squashfs_read_xattr_id_table(struct super_block *sb,
  17. u64 start, u64 *xattr_table_start, unsigned int *xattr_ids)
  18. {
  19. struct squashfs_xattr_id_table *id_table;
  20. id_table = squashfs_read_table(sb, start, sizeof(*id_table));
  21. if (IS_ERR(id_table))
  22. return (__le64 *) id_table;
  23. *xattr_table_start = le64_to_cpu(id_table->xattr_table_start);
  24. kfree(id_table);
  25. ERROR("Xattrs in filesystem, these will be ignored\n");
  26. return ERR_PTR(-ENOTSUPP);
  27. }
  28. static inline int squashfs_xattr_lookup(struct super_block *sb,
  29. unsigned int index, int *count, unsigned int *size,
  30. unsigned long long *xattr)
  31. {
  32. return 0;
  33. }
  34. #define squashfs_listxattr NULL
  35. #define squashfs_xattr_handlers NULL
  36. #endif