aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/codir.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/codir.c
parent3cc19c0c607ca780c79dbf42b4781d110a64e342 (diff)
downloadqemu-bed4352c4f041af65c522cb453aff468f49aebea.zip
qemu-bed4352c4f041af65c522cb453aff468f49aebea.tar.gz
qemu-bed4352c4f041af65c522cb453aff468f49aebea.tar.bz2
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/codir.c')
-rw-r--r--hw/9pfs/codir.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/9pfs/codir.c b/hw/9pfs/codir.c
index bc6a105..0c31db3 100644
--- a/hw/9pfs/codir.c
+++ b/hw/9pfs/codir.c
@@ -99,3 +99,19 @@ int v9fs_co_opendir(V9fsState *s, V9fsFidState *fidp)
});
return err;
}
+
+int v9fs_co_closedir(V9fsState *s, V9fsFidState *fidp)
+{
+ int err;
+ DIR *dir;
+
+ dir = fidp->fs.dir;
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->closedir(&s->ctx, dir);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}