aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/cofs.c
diff options
context:
space:
mode:
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 8fbfe73..473ce53 100644
--- a/hw/9pfs/cofs.c
+++ b/hw/9pfs/cofs.c
@@ -155,3 +155,17 @@ int v9fs_co_remove(V9fsState *s, V9fsString *path)
});
return err;
}
+
+int v9fs_co_rename(V9fsState *s, V9fsString *oldpath, V9fsString *newpath)
+{
+ int err;
+
+ v9fs_co_run_in_worker(
+ {
+ err = s->ops->rename(&s->ctx, oldpath->data, newpath->data);
+ if (err < 0) {
+ err = -errno;
+ }
+ });
+ return err;
+}