]>
Commit | Line | Data |
---|---|---|
fc22118d | 1 | /* |
267ae092 | 2 | * 9p |
fc22118d AK |
3 | * |
4 | * Copyright IBM, Corp. 2010 | |
5 | * | |
6 | * Authors: | |
7 | * Aneesh Kumar K.V <[email protected]> | |
8 | * | |
9 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
10 | * the COPYING file in the top-level directory. | |
11 | * | |
12 | */ | |
2a6a4076 MA |
13 | |
14 | #ifndef QEMU_9P_XATTR_H | |
15 | #define QEMU_9P_XATTR_H | |
fc22118d | 16 | |
1de7afc9 | 17 | #include "qemu/xattr.h" |
fc22118d AK |
18 | |
19 | typedef struct xattr_operations | |
20 | { | |
21 | const char *name; | |
22 | ssize_t (*getxattr)(FsContext *ctx, const char *path, | |
23 | const char *name, void *value, size_t size); | |
24 | ssize_t (*listxattr)(FsContext *ctx, const char *path, | |
25 | char *name, void *value, size_t size); | |
26 | int (*setxattr)(FsContext *ctx, const char *path, const char *name, | |
27 | void *value, size_t size, int flags); | |
28 | int (*removexattr)(FsContext *ctx, | |
29 | const char *path, const char *name); | |
30 | } XattrOperations; | |
31 | ||
56ad3e54 GK |
32 | ssize_t local_getxattr_nofollow(FsContext *ctx, const char *path, |
33 | const char *name, void *value, size_t size); | |
3e36aba7 GK |
34 | ssize_t local_setxattr_nofollow(FsContext *ctx, const char *path, |
35 | const char *name, void *value, size_t size, | |
36 | int flags); | |
72f0d0bf GK |
37 | ssize_t local_removexattr_nofollow(FsContext *ctx, const char *path, |
38 | const char *name); | |
fc22118d AK |
39 | |
40 | extern XattrOperations mapped_user_xattr; | |
41 | extern XattrOperations passthrough_user_xattr; | |
42 | ||
70fc55eb AK |
43 | extern XattrOperations mapped_pacl_xattr; |
44 | extern XattrOperations mapped_dacl_xattr; | |
45 | extern XattrOperations passthrough_acl_xattr; | |
46 | extern XattrOperations none_acl_xattr; | |
47 | ||
fc22118d AK |
48 | extern XattrOperations *mapped_xattr_ops[]; |
49 | extern XattrOperations *passthrough_xattr_ops[]; | |
50 | extern XattrOperations *none_xattr_ops[]; | |
51 | ||
64b85a8f BS |
52 | ssize_t v9fs_get_xattr(FsContext *ctx, const char *path, const char *name, |
53 | void *value, size_t size); | |
54 | ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value, | |
55 | size_t vsize); | |
56 | int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name, | |
fc22118d | 57 | void *value, size_t size, int flags); |
64b85a8f | 58 | int v9fs_remove_xattr(FsContext *ctx, const char *path, const char *name); |
56fc494b | 59 | |
64b85a8f BS |
60 | ssize_t pt_listxattr(FsContext *ctx, const char *path, char *name, void *value, |
61 | size_t size); | |
56fc494b GK |
62 | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name, |
63 | void *value, size_t size); | |
64 | int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value, | |
65 | size_t size, int flags); | |
66 | int pt_removexattr(FsContext *ctx, const char *path, const char *name); | |
67 | ||
68 | ssize_t notsup_getxattr(FsContext *ctx, const char *path, const char *name, | |
69 | void *value, size_t size); | |
70 | int notsup_setxattr(FsContext *ctx, const char *path, const char *name, | |
71 | void *value, size_t size, int flags); | |
72 | ssize_t notsup_listxattr(FsContext *ctx, const char *path, char *name, | |
73 | void *value, size_t size); | |
74 | int notsup_removexattr(FsContext *ctx, const char *path, const char *name); | |
70fc55eb | 75 | |
fc22118d | 76 | #endif |