pvdisplay: support -a option
PATCH 1/1 pvdisplay: support -a option
pvdisplay already supports the -a option, but it is filtered at the begining, so delete the redundant judgment.
--- tools/pvdisplay.c | 1 - 1 file changed, 1 deletion(-)
tools/pvdisplay.c +0 -1
@@ -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
PATCH 1/1 pvdisplay: support -a option
ping...
? 2022/6/9 9:47, Wu Guanghao ??:
Quoted 23 lines
pvdisplay already supports the -a option, but it is filtered at the begining, so delete the redundant judgment.
Signed-off-by Wu Guanghao <[email protected]>--- tools/pvdisplay.c | 1 - 1 file changed, 1 deletion(-)tools/pvdisplay.c +0
-2@@ -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
PATCH 1/1 pvdisplay: support -a option
Quoted 15 lines · Wu Guanghao
Quoted 15 lines
pvdisplay already supports the -a option, but it is filtered at the begining, so delete the redundant judgment.
Signed-off-by Wu Guanghao <[email protected]>--- tools/pvdisplay.c | 1 - 1 file changed, 1 deletion(-)tools/pvdisplay.c +0
-0@@ -72,7 +72,6 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv) }
Quoted 5 lines
tools/pvdisplay.c int pvdisplay(struct cmd_context *cmd, int argc, char **argv) · line 77
Quoted 5 lines
tools/pvdisplay.c +0
-1if (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