]>
git.proxmox.com Git - mirror_qemu.git/blob - hw/9pfs/coxattr.c
5 * Copyright IBM, Corp. 2011
8 * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
10 * This work is licensed under the terms of the GNU GPL, version 2. See
11 * the COPYING file in the top-level directory.
15 #include "fsdev/qemu-fsdev.h"
16 #include "qemu-thread.h"
17 #include "qemu-coroutine.h"
18 #include "virtio-9p-coth.h"
20 int v9fs_co_llistxattr(V9fsState
*s
, V9fsPath
*path
, void *value
, size_t size
)
24 v9fs_path_read_lock(s
);
25 v9fs_co_run_in_worker(
27 err
= s
->ops
->llistxattr(&s
->ctx
, path
, value
, size
);
36 int v9fs_co_lgetxattr(V9fsState
*s
, V9fsPath
*path
,
37 V9fsString
*xattr_name
,
38 void *value
, size_t size
)
42 v9fs_path_read_lock(s
);
43 v9fs_co_run_in_worker(
45 err
= s
->ops
->lgetxattr(&s
->ctx
, path
,
56 int v9fs_co_lsetxattr(V9fsState
*s
, V9fsPath
*path
,
57 V9fsString
*xattr_name
, void *value
,
58 size_t size
, int flags
)
62 v9fs_path_read_lock(s
);
63 v9fs_co_run_in_worker(
65 err
= s
->ops
->lsetxattr(&s
->ctx
, path
,
66 xattr_name
->data
, value
,
76 int v9fs_co_lremovexattr(V9fsState
*s
, V9fsPath
*path
,
77 V9fsString
*xattr_name
)
81 v9fs_path_read_lock(s
);
82 v9fs_co_run_in_worker(
84 err
= s
->ops
->lremovexattr(&s
->ctx
, path
, xattr_name
->data
);