xattr_user.c 882 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * linux/fs/hfsplus/xattr_user.c
  3. *
  4. * Vyacheslav Dubeyko <slava@dubeyko.com>
  5. *
  6. * Handler for user extended attributes.
  7. */
  8. #include <linux/nls.h>
  9. #include "hfsplus_fs.h"
  10. #include "xattr.h"
  11. static int hfsplus_user_getxattr(const struct xattr_handler *handler,
  12. struct dentry *dentry, const char *name,
  13. void *buffer, size_t size)
  14. {
  15. return hfsplus_getxattr(dentry, name, buffer, size,
  16. XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
  17. }
  18. static int hfsplus_user_setxattr(const struct xattr_handler *handler,
  19. struct dentry *dentry, const char *name,
  20. const void *buffer, size_t size, int flags)
  21. {
  22. return hfsplus_setxattr(dentry, name, buffer, size, flags,
  23. XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
  24. }
  25. const struct xattr_handler hfsplus_xattr_user_handler = {
  26. .prefix = XATTR_USER_PREFIX,
  27. .get = hfsplus_user_getxattr,
  28. .set = hfsplus_user_setxattr,
  29. };