[Qemu-devel] [PATCH v5 0/1] 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes

Tobias Schramm posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170619233718.24959-1-tobleminer@gmail.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
fsdev/file-op-9p.h      |  4 ++++
fsdev/qemu-fsdev-opts.c | 12 ++++++++++++
hw/9pfs/9p-local.c      | 25 +++++++++++++++++++++----
hw/9pfs/9p.c            |  3 +++
qemu-options.hx         | 20 ++++++++++++++++----
5 files changed, 56 insertions(+), 8 deletions(-)
[Qemu-devel] [PATCH v5 0/1] 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes
Posted by Tobias Schramm 6 years, 10 months ago
Hi Greg,

thank you for your hints on improving this patch. I've implemented them all
in this version.

In the last version of the patch I moved the path check down because I moved
the g_strdup and tried to keep all operations performed on path as close
together as possible to increase readability. But I clearly didn't think of
madatory vs optional aguments.

I introduced extra variables for fmode and dmode for clear separation of
fetching and processing of arguments. But I guess that trade off is just
personal preference.

I do agree that unifying the mapped mode checks is a good idea. Considering
that it is used in quite a few places might it be a good idea to write a macro
for that check?

Also I have added a much more descriptive commit message.

Again, thank you for the great help (and patience :)).

Regards,

Tobias Schramm

Tobias Schramm (1):
  9pfs: local: Add support for custom fmode/dmode in 9ps mapped security
    modes

 fsdev/file-op-9p.h      |  4 ++++
 fsdev/qemu-fsdev-opts.c | 12 ++++++++++++
 hw/9pfs/9p-local.c      | 25 +++++++++++++++++++++----
 hw/9pfs/9p.c            |  3 +++
 qemu-options.hx         | 20 ++++++++++++++++----
 5 files changed, 56 insertions(+), 8 deletions(-)

-- 
2.13.1


Re: [Qemu-devel] [PATCH v5 0/1] 9pfs: local: Add support for custom fmode/dmode in 9ps mapped security modes
Posted by Greg Kurz 6 years, 10 months ago
On Tue, 20 Jun 2017 01:37:17 +0200
Tobias Schramm <tobleminer@gmail.com> wrote:

> Hi Greg,
> 
> thank you for your hints on improving this patch. I've implemented them all
> in this version.
> 
> In the last version of the patch I moved the path check down because I moved
> the g_strdup and tried to keep all operations performed on path as close
> together as possible to increase readability. But I clearly didn't think of
> madatory vs optional aguments.
> 
> I introduced extra variables for fmode and dmode for clear separation of
> fetching and processing of arguments. But I guess that trade off is just
> personal preference.
> 
> I do agree that unifying the mapped mode checks is a good idea. Considering
> that it is used in quite a few places might it be a good idea to write a macro
> for that check?
> 

Yeah, I was thinking about some static inline helpers.

> Also I have added a much more descriptive commit message.
> 
> Again, thank you for the great help (and patience :)).
> 
> Regards,
> 
> Tobias Schramm
> 
> Tobias Schramm (1):
>   9pfs: local: Add support for custom fmode/dmode in 9ps mapped security
>     modes
> 
>  fsdev/file-op-9p.h      |  4 ++++
>  fsdev/qemu-fsdev-opts.c | 12 ++++++++++++
>  hw/9pfs/9p-local.c      | 25 +++++++++++++++++++++----
>  hw/9pfs/9p.c            |  3 +++
>  qemu-options.hx         | 20 ++++++++++++++++----
>  5 files changed, 56 insertions(+), 8 deletions(-)
>