mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
hw/9pfs: Add yeild support to rename coroutine
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
ae1ef571fc
commit
2a487e05de
2 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue