blob: 61861573391b33eb89f99b90a8d7a1c6214cd5a1 [file] [log] [blame]
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -08001/*
2 * linux/fs/hfsplus/xattr_trusted.c
3 *
4 * Vyacheslav Dubeyko <slava@dubeyko.com>
5 *
6 * Handler for trusted extended attributes.
7 */
8
Hin-Tak Leungbf29e882014-06-06 14:36:22 -07009#include <linux/nls.h>
10
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -080011#include "hfsplus_fs.h"
12#include "xattr.h"
13
14static int hfsplus_trusted_getxattr(struct dentry *dentry, const char *name,
15 void *buffer, size_t size, int type)
16{
Fabian Fredericka3cef4c2015-04-16 12:46:58 -070017 return hfsplus_getxattr(dentry, name, buffer, size,
18 XATTR_TRUSTED_PREFIX,
19 XATTR_TRUSTED_PREFIX_LEN);
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -080020}
21
22static int hfsplus_trusted_setxattr(struct dentry *dentry, const char *name,
23 const void *buffer, size_t size, int flags, int type)
24{
Fabian Frederick5e614732015-04-16 12:47:01 -070025 return hfsplus_setxattr(dentry, name, buffer, size, flags,
26 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -080027}
28
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -080029const struct xattr_handler hfsplus_xattr_trusted_handler = {
30 .prefix = XATTR_TRUSTED_PREFIX,
Vyacheslav Dubeyko127e5f52013-02-27 17:03:03 -080031 .get = hfsplus_trusted_getxattr,
32 .set = hfsplus_trusted_setxattr,
33};