1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _LINUX_XATTR_H
13#define _LINUX_XATTR_H
14
15#define XATTR_CREATE 0x1
16#define XATTR_REPLACE 0x2
17
18#define XATTR_OS2_PREFIX "os2."
19#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
20
21#define XATTR_SECURITY_PREFIX "security."
22#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
23
24#define XATTR_SYSTEM_PREFIX "system."
25#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
26
27#define XATTR_TRUSTED_PREFIX "trusted."
28#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
29
30#define XATTR_USER_PREFIX "user."
31#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
32
33struct xattr_handler {
34 char *prefix;
35 size_t (*list)(struct inode *inode, char *list, size_t list_size,
36 const char *name, size_t name_len);
37 int (*get)(struct inode *inode, const char *name, void *buffer,
38 size_t size);
39 int (*set)(struct inode *inode, const char *name, const void *buffer,
40 size_t size, int flags);
41};
42
43#endif
44