aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-9p.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio-9p.c')
-rw-r--r--hw/virtio-9p.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index a7ba4b6abb..24291f4860 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -154,7 +154,10 @@ static int v9fs_do_writev(V9fsState *s, int fd, const struct iovec *iov,
static int v9fs_do_chmod(V9fsState *s, V9fsString *path, mode_t mode)
{
- return s->ops->chmod(&s->ctx, path->data, mode);
+ FsCred cred;
+ cred_init(&cred);
+ cred.fc_mode = mode;
+ return s->ops->chmod(&s->ctx, path->data, &cred);
}
static int v9fs_do_mknod(V9fsState *s, V9fsString *path, mode_t mode, dev_t dev)