All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pvdisplay: support -a option
@ 2022-06-09  1:47 Wu Guanghao
  2022-06-25  2:21 ` Wu Guanghao
  0 siblings, 1 reply; 3+ messages in thread
From: Wu Guanghao @ 2022-06-09  1:47 UTC (permalink / raw)
  To: lvm-devel

pvdisplay already supports the -a option, but it is filtered at the begining,
so delete the redundant judgment.

Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
---
 tools/pvdisplay.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c
index 11f38ebd2..1ed9c0d3f 100644
--- a/tools/pvdisplay.c
+++ b/tools/pvdisplay.c
@@ -72,7 +72,6 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv)
        }

        if (arg_is_set(cmd, aligned_ARG) ||
-           arg_is_set(cmd, all_ARG) ||
            arg_is_set(cmd, binary_ARG) ||
            arg_is_set(cmd, noheadings_ARG) ||
            arg_is_set(cmd, options_ARG) ||
--
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] pvdisplay: support -a option
  2022-06-09  1:47 [PATCH] pvdisplay: support -a option Wu Guanghao
@ 2022-06-25  2:21 ` Wu Guanghao
  2022-06-27 14:54   ` David Teigland
  0 siblings, 1 reply; 3+ messages in thread
From: Wu Guanghao @ 2022-06-25  2:21 UTC (permalink / raw)
  To: lvm-devel

ping...

? 2022/6/9 9:47, Wu Guanghao ??:
> pvdisplay already supports the -a option, but it is filtered at the begining,
> so delete the redundant judgment.
> 
> Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
> ---
>  tools/pvdisplay.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c
> index 11f38ebd2..1ed9c0d3f 100644
> --- a/tools/pvdisplay.c
> +++ b/tools/pvdisplay.c
> @@ -72,7 +72,6 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv)
>         }
> 
>         if (arg_is_set(cmd, aligned_ARG) ||
> -           arg_is_set(cmd, all_ARG) ||
>             arg_is_set(cmd, binary_ARG) ||
>             arg_is_set(cmd, noheadings_ARG) ||
>             arg_is_set(cmd, options_ARG) ||
> --
> 2.27.0
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] pvdisplay: support -a option
  2022-06-25  2:21 ` Wu Guanghao
@ 2022-06-27 14:54   ` David Teigland
  0 siblings, 0 replies; 3+ messages in thread
From: David Teigland @ 2022-06-27 14:54 UTC (permalink / raw)
  To: lvm-devel

On Sat, Jun 25, 2022 at 10:21:21AM +0800, Wu Guanghao wrote:
> > pvdisplay already supports the -a option, but it is filtered at the begining,
> > so delete the redundant judgment.
> > 
> > Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
> > ---
> >  tools/pvdisplay.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c
> > index 11f38ebd2..1ed9c0d3f 100644
> > --- a/tools/pvdisplay.c
> > +++ b/tools/pvdisplay.c
> > @@ -72,7 +72,6 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv)
> >         }
> > 
> >         if (arg_is_set(cmd, aligned_ARG) ||
> > -           arg_is_set(cmd, all_ARG) ||
> >             arg_is_set(cmd, binary_ARG) ||
> >             arg_is_set(cmd, noheadings_ARG) ||
> >             arg_is_set(cmd, options_ARG) ||

You've probably seen that tools/command-lines.in is where we now define
the options accepted by each command.  But, many commands still contain
redundant option checking that could be removed.  So, nearly all of the
option checks in pvdisplay can be removed, not just -a (and many of the
option combination rules can also be defined in command-lines.h.)  If
you'd like to send a larger patch for pvdisplay then we could apply
that instead.
Thanks, Dave


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-27 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09  1:47 [PATCH] pvdisplay: support -a option Wu Guanghao
2022-06-25  2:21 ` Wu Guanghao
2022-06-27 14:54   ` David Teigland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.