diff options
author | Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> | 2011-08-09 00:01:22 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-08-22 09:44:33 +0530 |
commit | c6c069b0c5fdfc748008d8a4879f3d41c1d32702 (patch) | |
tree | 0c400fd7a6ca73a464b2522b6703d55ec2af7754 /hw/9pfs/cofile.c | |
parent | 3fa2a8d1cd5794dd20c5bdb71e5a6db4b6f8eb4f (diff) | |
download | qemu-c6c069b0c5fdfc748008d8a4879f3d41c1d32702.zip qemu-c6c069b0c5fdfc748008d8a4879f3d41c1d32702.tar.gz qemu-c6c069b0c5fdfc748008d8a4879f3d41c1d32702.tar.bz2 |
hw/9pfs: Add yield support for link coroutine
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/cofile.c')
-rw-r--r-- | hw/9pfs/cofile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/9pfs/cofile.c b/hw/9pfs/cofile.c index 26dd636..52eec2a 100644 --- a/hw/9pfs/cofile.c +++ b/hw/9pfs/cofile.c @@ -113,3 +113,17 @@ int v9fs_co_fsync(V9fsState *s, V9fsFidState *fidp, int datasync) }); return err; } + +int v9fs_co_link(V9fsState *s, V9fsString *oldpath, V9fsString *newpath) +{ + int err; + + v9fs_co_run_in_worker( + { + err = s->ops->link(&s->ctx, oldpath->data, newpath->data); + if (err < 0) { + err = -errno; + } + }); + return err; +} |