command: Cleaned up in cmd_target_power

This commit is contained in:
dragonmux 2022-07-26 12:34:45 +01:00 committed by Piotr Esden-Tempski
parent e8610d9ca2
commit 39611b8b4f
1 changed files with 3 additions and 4 deletions

View File

@ -458,9 +458,9 @@ static bool cmd_tdi_low_reset(target *t, int argc, const char **argv)
static bool cmd_target_power(target *t, int argc, const char **argv)
{
(void)t;
if (argc == 1) {
if (argc == 1)
gdb_outf("Target Power: %s\n", platform_target_get_power() ? "enabled" : "disabled");
} else if (argc == 2) {
else if (argc == 2) {
bool want_enable = false;
if (parse_enable_or_disable(argv[1], &want_enable)) {
if (want_enable && !platform_target_get_power() &&
@ -472,9 +472,8 @@ static bool cmd_target_power(target *t, int argc, const char **argv)
gdb_outf("%s target power\n", want_enable ? "Enabling" : "Disabling");
}
}
} else {
} else
gdb_outf("Unrecognized command format\n");
}
return true;
}
#endif