On 06/18/2017 03:28 AM, Tobias Schramm wrote: > Signed-off-by: Tobias Schramm <toblemi...@gmail.com> > --- > fsdev/file-op-9p.h | 4 ++++ > fsdev/qemu-fsdev-opts.c | 12 ++++++++++++ > hw/9pfs/9p-local.c | 33 +++++++++++++++++++++++++++++---- > hw/9pfs/9p.c | 3 +++ > 4 files changed, 48 insertions(+), 4 deletions(-) > > diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h > index 0844a403dc..0ecb1d392b 100644 > --- a/fsdev/file-op-9p.h > +++ b/fsdev/file-op-9p.h > @@ -76,6 +76,8 @@ typedef struct FsDriverEntry { > int export_flags; > FileOperations *ops; > FsThrottle fst; > + mode_t fmask; > + mode_t dmask; > } FsDriverEntry; >
> +++ b/fsdev/qemu-fsdev-opts.c > @@ -38,6 +38,12 @@ static QemuOptsList qemu_fsdev_opts = { > }, { > .name = "sock_fd", > .type = QEMU_OPT_NUMBER, > + }, { > + .name = "fmask", > + .type = QEMU_OPT_STRING, > + }, { > + .name = "dmask", > + .type = QEMU_OPT_STRING, No documentation of what these represent (other than the cover letter). I'd at least expect a comment of 'default creation mask for files' and 'default creation mask for directories'; it would also be nice to state if the mask is positive or negative logic (compare the third argument passed to open() which specifies bits to set, vs. the argument to umask which specifies bits to keep clear). Also, does this need a QAPI counterpart (or can you even create a 9pfs device through QMP)? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature