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