diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-05-07 21:09:24 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-08-22 09:44:13 +0530 |
commit | bed4352c4f041af65c522cb453aff468f49aebea (patch) | |
tree | 86bce64205f8feb6227cee10204a713188c84b26 /hw/9pfs/codir.c | |
parent | 3cc19c0c607ca780c79dbf42b4781d110a64e342 (diff) | |
download | qemu-bed4352c4f041af65c522cb453aff468f49aebea.zip |
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.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/9pfs/codir.c b/hw/9pfs/codir.c index bc6a105b77..0c31db3cbc 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; +} |