strongarm ioctl rename fallout
[qemu/aliguori.git] / hw / 9pfs / coxattr.c
blob2fba2c98c2345870227168dc64711006d78bf79a
2 /*
3 * Virtio 9p backend
5 * Copyright IBM, Corp. 2011
7 * Authors:
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, V9fsString *path, void *value, size_t size)
22 int err;
24 v9fs_co_run_in_worker(
26 err = s->ops->llistxattr(&s->ctx, path->data, value, size);
27 if (err < 0) {
28 err = -errno;
30 });
31 return err;
34 int v9fs_co_lgetxattr(V9fsState *s, V9fsString *path,
35 V9fsString *xattr_name,
36 void *value, size_t size)
38 int err;
40 v9fs_co_run_in_worker(
42 err = s->ops->lgetxattr(&s->ctx, path->data,
43 xattr_name->data,
44 value, size);
45 if (err < 0) {
46 err = -errno;
48 });
49 return err;