Vyacheslav Dubeyko | 127e5f5 | 2013-02-27 17:03:03 -0800 | [diff] [blame] | 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 | |
| 14 | extern const struct xattr_handler hfsplus_xattr_osx_handler; |
| 15 | extern const struct xattr_handler hfsplus_xattr_user_handler; |
| 16 | extern const struct xattr_handler hfsplus_xattr_trusted_handler; |
Vyacheslav Dubeyko | b4c1107 | 2013-09-11 14:24:30 -0700 | [diff] [blame] | 17 | extern const struct xattr_handler hfsplus_xattr_acl_access_handler; |
| 18 | extern const struct xattr_handler hfsplus_xattr_acl_default_handler; |
Vyacheslav Dubeyko | 127e5f5 | 2013-02-27 17:03:03 -0800 | [diff] [blame] | 19 | extern const struct xattr_handler hfsplus_xattr_security_handler; |
| 20 | |
| 21 | extern const struct xattr_handler *hfsplus_xattr_handlers[]; |
| 22 | |
| 23 | int __hfsplus_setxattr(struct inode *inode, const char *name, |
| 24 | const void *value, size_t size, int flags); |
| 25 | |
| 26 | static 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 | |
Vyacheslav Dubeyko | b4c1107 | 2013-09-11 14:24:30 -0700 | [diff] [blame] | 32 | ssize_t __hfsplus_getxattr(struct inode *inode, const char *name, |
Vyacheslav Dubeyko | 127e5f5 | 2013-02-27 17:03:03 -0800 | [diff] [blame] | 33 | void *value, size_t size); |
| 34 | |
Vyacheslav Dubeyko | b4c1107 | 2013-09-11 14:24:30 -0700 | [diff] [blame] | 35 | static inline ssize_t hfsplus_getxattr(struct dentry *dentry, |
| 36 | const char *name, |
| 37 | void *value, |
| 38 | size_t size) |
| 39 | { |
| 40 | return __hfsplus_getxattr(dentry->d_inode, name, value, size); |
| 41 | } |
| 42 | |
Vyacheslav Dubeyko | 127e5f5 | 2013-02-27 17:03:03 -0800 | [diff] [blame] | 43 | ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size); |
| 44 | |
| 45 | int hfsplus_removexattr(struct dentry *dentry, const char *name); |
| 46 | |
| 47 | int hfsplus_init_security(struct inode *inode, struct inode *dir, |
| 48 | const struct qstr *qstr); |
| 49 | |
Vyacheslav Dubeyko | b4c1107 | 2013-09-11 14:24:30 -0700 | [diff] [blame] | 50 | int hfsplus_init_inode_security(struct inode *inode, struct inode *dir, |
| 51 | const struct qstr *qstr); |
Vyacheslav Dubeyko | 127e5f5 | 2013-02-27 17:03:03 -0800 | [diff] [blame] | 52 | |
| 53 | #endif |