mirror of https://github.com/xemu-project/xemu.git
hw/9pfs: Add yield support to statfs coroutine
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
parent
5e4eaa79cf
commit
94840ff9f3
|
@ -42,3 +42,17 @@ int v9fs_co_readlink(V9fsState *s, V9fsString *path, V9fsString *buf)
|
||||||
}
|
}
|
||||||
return err;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -62,4 +62,5 @@ extern int v9fs_co_readdir(V9fsState *, V9fsFidState *,
|
||||||
extern off_t v9fs_co_telldir(V9fsState *, V9fsFidState *);
|
extern off_t v9fs_co_telldir(V9fsState *, V9fsFidState *);
|
||||||
extern void v9fs_co_seekdir(V9fsState *, V9fsFidState *, off_t);
|
extern void v9fs_co_seekdir(V9fsState *, V9fsFidState *, off_t);
|
||||||
extern void v9fs_co_rewinddir(V9fsState *, V9fsFidState *);
|
extern void v9fs_co_rewinddir(V9fsState *, V9fsFidState *);
|
||||||
|
extern int v9fs_co_statfs(V9fsState *, V9fsString *, struct statfs *);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue