diff options
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 a4c0ae75cc..e400b86d84 100644 --- a/hw/9pfs/cofile.c +++ b/hw/9pfs/cofile.c @@ -30,3 +30,17 @@ int v9fs_co_lstat(V9fsState *s, V9fsString *path, struct stat *stbuf) }); return err; } + +int v9fs_co_fstat(V9fsState *s, int fd, struct stat *stbuf) +{ + int err; + + v9fs_co_run_in_worker( + { + err = s->ops->fstat(&s->ctx, fd, stbuf); + if (err < 0) { + err = -errno; + } + }); + return err; +} |