Blame view

fs/hfsplus/xattr_trusted.c 1.01 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  // SPDX-License-Identifier: GPL-2.0
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
2
3
4
5
6
7
8
  /*
   * linux/fs/hfsplus/xattr_trusted.c
   *
   * Vyacheslav Dubeyko <slava@dubeyko.com>
   *
   * Handler for trusted extended attributes.
   */
bf29e886b   Hin-Tak Leung   hfsplus: correct ...
9
  #include <linux/nls.h>
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
10
11
  #include "hfsplus_fs.h"
  #include "xattr.h"
d9a82a040   Andreas Gruenbacher   xattr handlers: P...
12
  static int hfsplus_trusted_getxattr(const struct xattr_handler *handler,
b296821a7   Al Viro   xattr_handler: pa...
13
  				    struct dentry *unused, struct inode *inode,
3484eba91   Mark Salyzyn   FROMLIST: Add fla...
14
15
  				    const char *name, void *buffer,
  				    size_t size, int flags)
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
16
  {
b296821a7   Al Viro   xattr_handler: pa...
17
  	return hfsplus_getxattr(inode, name, buffer, size,
a3cef4cd6   Fabian Frederick   fs/hfsplus: move ...
18
19
  				XATTR_TRUSTED_PREFIX,
  				XATTR_TRUSTED_PREFIX_LEN);
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
20
  }
d9a82a040   Andreas Gruenbacher   xattr handlers: P...
21
  static int hfsplus_trusted_setxattr(const struct xattr_handler *handler,
593012268   Al Viro   switch xattr_hand...
22
23
24
  				    struct dentry *unused, struct inode *inode,
  				    const char *name, const void *buffer,
  				    size_t size, int flags)
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
25
  {
593012268   Al Viro   switch xattr_hand...
26
  	return hfsplus_setxattr(inode, name, buffer, size, flags,
5e61473ea   Fabian Frederick   fs/hfsplus: move ...
27
  				XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
28
  }
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
29
30
  const struct xattr_handler hfsplus_xattr_trusted_handler = {
  	.prefix	= XATTR_TRUSTED_PREFIX,
127e5f5ae   Vyacheslav Dubeyko   hfsplus: rework f...
31
32
33
  	.get	= hfsplus_trusted_getxattr,
  	.set	= hfsplus_trusted_setxattr,
  };