1#ifndef EXTATTR_SOLARIS_H
2#define EXTATTR_SOLARIS_H
3
4#include <sys/types.h>
5#include <sys/stat.h>
6#include <fcntl.h>
7
8/*
9 * XXX: FIXME: Need to distinguish file non-existence and attribute
10 * non-existence. Need to choose an unused error code somehow.
11 */
12#ifndef ENOATTR
13#define ENOATTR ENOENT
14#endif
15
16struct hv;
17
18int solaris_setxattr (const char *path,
19		      const char *attrname,
20		      const char *attrvalue,
21		      const size_t slen,
22		      struct hv *flags);
23
24int solaris_fsetxattr (const int fd,
25		       const char *attrname,
26		       const char *attrvalue,
27		       const size_t slen,
28		       struct hv *flags);
29
30int solaris_getxattr (const char *path,
31		      const char *attrname,
32		      void *attrvalue,
33		      const size_t slen,
34		      struct hv *flags);
35
36int solaris_fgetxattr (const int fd,
37		       const char *attrname,
38		       void *attrvalue,
39		       const size_t slen,
40		      struct hv *flags);
41
42int solaris_removexattr (const char *path,
43			 const char *attrname,
44			 struct hv *flags);
45
46int solaris_fremovexattr (const int fd,
47			  const char *attrname,
48			  struct hv *flags);
49
50ssize_t solaris_listxattr (const char *path,
51			   char *buf,
52			   const size_t buflen,
53			   struct hv *flags);
54
55ssize_t solaris_flistxattr (const int fd,
56			    char *buf,
57			    const size_t buflen,
58			    struct hv *flags);
59
60ssize_t solaris_listxattrns (const char *path,
61			     char *buf,
62			     const size_t buflen,
63			     struct hv *flags);
64
65ssize_t solaris_flistxattrns (const int fd,
66			      char *buf,
67			      const size_t buflen,
68			      struct hv *flags);
69
70#endif /* EXTATTR_SOLARIS_H */
71