summaryrefslogtreecommitdiffstats
path: root/hw/9pfs/coxattr.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-05-07 21:09:24 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-08-22 09:44:13 +0530
commitbed4352c4f041af65c522cb453aff468f49aebea (patch)
tree86bce64205f8feb6227cee10204a713188c84b26 /hw/9pfs/coxattr.c
parent3cc19c0c607ca780c79dbf42b4781d110a64e342 (diff)
downloadhqemu-bed4352c4f041af65c522cb453aff468f49aebea.zip
hqemu-bed4352c4f041af65c522cb453aff468f49aebea.tar.gz
hw/9pfs: Add yeild support for clunk related coroutine
This include lsetxattr, lremovexattr, closedir and close. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/coxattr.c')
-rw-r--r--hw/9pfs/coxattr.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/hw/9pfs/coxattr.c b/hw/9pfs/coxattr.c
index 2fba2c9..a289389 100644
--- a/hw/9pfs/coxattr.c
+++ b/hw/9pfs/coxattr.c
@@ -48,3 +48,37 @@ int v9fs_co_lgetxattr(V9fsState *s, V9fsString *path,
});
return err;
}
+
+int v9fs_co_lsetxattr(V9fsState *s, V9fsString *path,
+ V9fsString *xattr_name, void *value,
+ size_t size, int flags)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->lsetxattr(&s->ctx, path->data,
+ xattr_name->data, value,
+ size, flags);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
+
+int v9fs_co_lremovexattr(V9fsState *s, V9fsString *path,
+ V9fsString *xattr_name)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->lremovexattr(&s->ctx, path->data,
+ xattr_name->data);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}
OpenPOWER on IntegriCloud