]> Git Repo - qemu.git/blame - hw/9pfs/9p-xattr.h
9pfs: local: lgetxattr: don't follow symlinks
[qemu.git] / hw / 9pfs / 9p-xattr.h
CommitLineData
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
19typedef 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
32ssize_t local_getxattr_nofollow(FsContext *ctx, const char *path,
33 const char *name, void *value, size_t size);
fc22118d
AK
34
35extern XattrOperations mapped_user_xattr;
36extern XattrOperations passthrough_user_xattr;
37
70fc55eb
AK
38extern XattrOperations mapped_pacl_xattr;
39extern XattrOperations mapped_dacl_xattr;
40extern XattrOperations passthrough_acl_xattr;
41extern XattrOperations none_acl_xattr;
42
fc22118d
AK
43extern XattrOperations *mapped_xattr_ops[];
44extern XattrOperations *passthrough_xattr_ops[];
45extern XattrOperations *none_xattr_ops[];
46
64b85a8f
BS
47ssize_t v9fs_get_xattr(FsContext *ctx, const char *path, const char *name,
48 void *value, size_t size);
49ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value,
50 size_t vsize);
51int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
fc22118d 52 void *value, size_t size, int flags);
64b85a8f 53int v9fs_remove_xattr(FsContext *ctx, const char *path, const char *name);
56fc494b 54
64b85a8f
BS
55ssize_t pt_listxattr(FsContext *ctx, const char *path, char *name, void *value,
56 size_t size);
56fc494b
GK
57ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name,
58 void *value, size_t size);
59int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value,
60 size_t size, int flags);
61int pt_removexattr(FsContext *ctx, const char *path, const char *name);
62
63ssize_t notsup_getxattr(FsContext *ctx, const char *path, const char *name,
64 void *value, size_t size);
65int notsup_setxattr(FsContext *ctx, const char *path, const char *name,
66 void *value, size_t size, int flags);
67ssize_t notsup_listxattr(FsContext *ctx, const char *path, char *name,
68 void *value, size_t size);
69int notsup_removexattr(FsContext *ctx, const char *path, const char *name);
70fc55eb 70
fc22118d 71#endif
This page took 0.419957 seconds and 4 git commands to generate.