]> Git Repo - qemu.git/commitdiff
hw/9pfs: Add yield support for link coroutine
authorVenkateswararao Jujjuri <[email protected]>
Mon, 8 Aug 2011 18:31:22 +0000 (00:01 +0530)
committerAneesh Kumar K.V <[email protected]>
Mon, 22 Aug 2011 04:14:33 +0000 (09:44 +0530)
Signed-off-by: Venkateswararao Jujjuri <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
hw/9pfs/cofile.c
hw/9pfs/virtio-9p-coth.h

index 26dd636776fb47f067775b0a9bfe8a89304acc14..52eec2a662a8b4e36c10b7bf05397e8562e3f175 100644 (file)
@@ -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;
+}
index e3949330c92b433335bfb2787006bce5c32901b4..17ffd76f367feef7dee75054747030715009b9c0 100644 (file)
@@ -88,4 +88,5 @@ extern int v9fs_co_close(V9fsState *, V9fsFidState *);
 extern int v9fs_co_fsync(V9fsState *, V9fsFidState *, int);
 extern int v9fs_co_symlink(V9fsState *, V9fsFidState *, const char *,
                            const char *, gid_t);
+extern int v9fs_co_link(V9fsState *, V9fsString *, V9fsString *);
 #endif
This page took 0.028389 seconds and 4 git commands to generate.