xattr.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * linux/fs/hfsplus/xattr.h
  3. *
  4. * Vyacheslav Dubeyko <slava@dubeyko.com>
  5. *
  6. * Logic of processing extended attributes
  7. */
  8. #ifndef _LINUX_HFSPLUS_XATTR_H
  9. #define _LINUX_HFSPLUS_XATTR_H
  10. #include <linux/xattr.h>
  11. extern const struct xattr_handler hfsplus_xattr_osx_handler;
  12. extern const struct xattr_handler hfsplus_xattr_user_handler;
  13. extern const struct xattr_handler hfsplus_xattr_trusted_handler;
  14. /*extern const struct xattr_handler hfsplus_xattr_acl_access_handler;*/
  15. /*extern const struct xattr_handler hfsplus_xattr_acl_default_handler;*/
  16. extern const struct xattr_handler hfsplus_xattr_security_handler;
  17. extern const struct xattr_handler *hfsplus_xattr_handlers[];
  18. int __hfsplus_setxattr(struct inode *inode, const char *name,
  19. const void *value, size_t size, int flags);
  20. static inline int hfsplus_setxattr(struct dentry *dentry, const char *name,
  21. const void *value, size_t size, int flags)
  22. {
  23. return __hfsplus_setxattr(dentry->d_inode, name, value, size, flags);
  24. }
  25. ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
  26. void *value, size_t size);
  27. ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);
  28. int hfsplus_removexattr(struct dentry *dentry, const char *name);
  29. int hfsplus_init_security(struct inode *inode, struct inode *dir,
  30. const struct qstr *qstr);
  31. static inline int hfsplus_init_acl(struct inode *inode, struct inode *dir)
  32. {
  33. /*TODO: implement*/
  34. return 0;
  35. }
  36. static inline int hfsplus_init_inode_security(struct inode *inode,
  37. struct inode *dir,
  38. const struct qstr *qstr)
  39. {
  40. int err;
  41. err = hfsplus_init_acl(inode, dir);
  42. if (!err)
  43. err = hfsplus_init_security(inode, dir, qstr);
  44. return err;
  45. }
  46. #endif