summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/xattr.h
blob: 847b695b984dfe22148cfb61a4708ac844221d66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * linux/fs/hfsplus/xattr.h
 *
 * Vyacheslav Dubeyko <slava@dubeyko.com>
 *
 * Logic of processing extended attributes
 */

#ifndef _LINUX_HFSPLUS_XATTR_H
#define _LINUX_HFSPLUS_XATTR_H

#include <linux/xattr.h>

extern const struct xattr_handler hfsplus_xattr_osx_handler;
extern const struct xattr_handler hfsplus_xattr_user_handler;
extern const struct xattr_handler hfsplus_xattr_trusted_handler;
/*extern const struct xattr_handler hfsplus_xattr_acl_access_handler;*/
/*extern const struct xattr_handler hfsplus_xattr_acl_default_handler;*/
extern const struct xattr_handler hfsplus_xattr_security_handler;

extern const struct xattr_handler *hfsplus_xattr_handlers[];

int __hfsplus_setxattr(struct inode *inode, const char *name,
			const void *value, size_t size, int flags);

static inline int hfsplus_setxattr(struct dentry *dentry, const char *name,
			const void *value, size_t size, int flags)
{
	return __hfsplus_setxattr(dentry->d_inode, name, value, size, flags);
}

ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
			void *value, size_t size);

ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);

int hfsplus_removexattr(struct dentry *dentry, const char *name);

int hfsplus_init_security(struct inode *inode, struct inode *dir,
				const struct qstr *qstr);

static inline int hfsplus_init_acl(struct inode *inode, struct inode *dir)
{
	/*TODO: implement*/
	return 0;
}

static inline int hfsplus_init_inode_security(struct inode *inode,
						struct inode *dir,
						const struct qstr *qstr)
{
	int err;

	err = hfsplus_init_acl(inode, dir);
	if (!err)
		err = hfsplus_init_security(inode, dir, qstr);
	return err;
}

#endif
OpenPOWER on IntegriCloud