aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/xattr.h
diff options
context:
space:
mode:
authorVyacheslav Dubeyko <slava@dubeyko.com>2013-02-27 20:03:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-27 22:10:10 -0500
commit127e5f5ae51eff44c9bff673f24e8587caa4e29f (patch)
treec36b2b22e18241b43a85e8719603ba0e6a897d68 /fs/hfsplus/xattr.h
parent3e05ca20fb570b456bd9841b5ff489d865e8c563 (diff)
hfsplus: rework functionality of getting, setting and deleting of extended attributes
Rework functionality of getting, setting and deleting of extended attributes. Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/xattr.h')
-rw-r--r--fs/hfsplus/xattr.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/fs/hfsplus/xattr.h b/fs/hfsplus/xattr.h
new file mode 100644
index 000000000000..847b695b984d
--- /dev/null
+++ b/fs/hfsplus/xattr.h
@@ -0,0 +1,60 @@
1/*
2 * linux/fs/hfsplus/xattr.h
3 *
4 * Vyacheslav Dubeyko <slava@dubeyko.com>
5 *
6 * Logic of processing extended attributes
7 */
8
9#ifndef _LINUX_HFSPLUS_XATTR_H
10#define _LINUX_HFSPLUS_XATTR_H
11
12#include <linux/xattr.h>
13
14extern const struct xattr_handler hfsplus_xattr_osx_handler;
15extern const struct xattr_handler hfsplus_xattr_user_handler;
16extern const struct xattr_handler hfsplus_xattr_trusted_handler;
17/*extern const struct xattr_handler hfsplus_xattr_acl_access_handler;*/
18/*extern const struct xattr_handler hfsplus_xattr_acl_default_handler;*/
19extern const struct xattr_handler hfsplus_xattr_security_handler;
20
21extern const struct xattr_handler *hfsplus_xattr_handlers[];
22
23int __hfsplus_setxattr(struct inode *inode, const char *name,
24 const void *value, size_t size, int flags);
25
26static inline int hfsplus_setxattr(struct dentry *dentry, const char *name,
27 const void *value, size_t size, int flags)
28{
29 return __hfsplus_setxattr(dentry->d_inode, name, value, size, flags);
30}
31
32ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
33 void *value, size_t size);
34
35ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);
36
37int hfsplus_removexattr(struct dentry *dentry, const char *name);
38
39int hfsplus_init_security(struct inode *inode, struct inode *dir,
40 const struct qstr *qstr);
41
42static inline int hfsplus_init_acl(struct inode *inode, struct inode *dir)
43{
44 /*TODO: implement*/
45 return 0;
46}
47
48static inline int hfsplus_init_inode_security(struct inode *inode,
49 struct inode *dir,
50 const struct qstr *qstr)
51{
52 int err;
53
54 err = hfsplus_init_acl(inode, dir);
55 if (!err)
56 err = hfsplus_init_security(inode, dir, qstr);
57 return err;
58}
59
60#endif