ShellPkg: acpiview: Make '-h' option not require a parameter

Make the -h command line option a binary flag. Now, colour
highlighting is enabled whenever this flag is set (stateless),
instead of being dependent on previous acpiview command
invocations.

By removing the parameter required with the -h flag the command
line parsing logic becomes simpler.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Krzysztof Koch
2019-06-28 16:57:00 +08:00
committed by Ray Ni
parent 5ed3b5624f
commit 4286eb22f4
2 changed files with 5 additions and 31 deletions

View File

@ -30,7 +30,7 @@
"Display ACPI Table information.\r\n"
".SH SYNOPSIS\r\n"
" \r\n"
"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h Highlight]]\r\n"
"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h]]\r\n"
" \r\n"
".SH OPTIONS\r\n"
" \r\n"
@ -40,9 +40,7 @@
" AcpiTable : The required ACPI Table type.\r\n"
" -d - Generate a binary file dump of the specified AcpiTable.\r\n"
" -q - Quiet. Suppress errors and warnings. Disables consistency checks.\r\n"
" -h - Enable/Disable Colour Highlighting.\r\n"
" Highlight : TRUE/ON enables highlighting;\r\n"
" FALSE/OFF (default) disables highlighting.\r\n"
" -h - Enable colour highlighting.\r\n"
" -? - Show help.\r\n"
" \r\n"
".SH DESCRIPTION\r\n"