u-boot/cmd/x86
Wolfgang Wallner cf9f38064d x86: mtrr: Fix parsing of "mtrr list" command
The command 'mtrr' does not recognize the 'list' subcommand any more
since the code restructuring in commit b2a76b3fe7 ("x86: mtrr:
Restructure so command execution is in one place").

The if-else parsing the command arguments does not take 'list' into
account: the if-branch is intended for no subcommands, the else-branch
is intended for the non-list subcommands (which all expect additional
arguments). Calling the 'mtrr list' subcommand leads to a "return
CMD_RET_USAGE" in the else-branch.

Fix this by changing the else-branch to explicitly checking for
if (cmd != 'l').

Fixes: b2a76b3fe7 ("x86: mtrr: Restructure so command execution is in one place")
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-09-01 13:24:45 +08:00
..
exception.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fsp.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
hob.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
Makefile x86: Add a common HOB library 2019-08-09 22:24:02 +08:00
mtrr.c x86: mtrr: Fix parsing of "mtrr list" command 2020-09-01 13:24:45 +08:00