summaryrefslogtreecommitdiff
path: root/hw/9pfs/cofs.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-05-18 16:03:49 -0700
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-08-08 23:42:58 +0530
commit94840ff9f383d4f7099394cc53af48f0a7065132 (patch)
treea831aa69819012536989a397006f2661944a0ec6 /hw/9pfs/cofs.c
parent5e4eaa79cf4645d200742901d449789dfa607230 (diff)
downloadqemu-94840ff9f383d4f7099394cc53af48f0a7065132.tar.gz
hw/9pfs: Add yield support to statfs coroutine
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/cofs.c')
-rw-r--r--hw/9pfs/cofs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/9pfs/cofs.c b/hw/9pfs/cofs.c
index 6bb8b47da3..4138e4d02a 100644
--- a/hw/9pfs/cofs.c
+++ b/hw/9pfs/cofs.c
@@ -42,3 +42,17 @@ int v9fs_co_readlink(V9fsState *s, V9fsString *path, V9fsString *buf)
}
return err;
}
+
+int v9fs_co_statfs(V9fsState *s, V9fsString *path, struct statfs *stbuf)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->statfs(&s->ctx, path->data, stbuf);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}